Skip to content

Commit

Permalink
Updates description, README and changes licence to MIT
Browse files Browse the repository at this point in the history
  • Loading branch information
ricca509 committed Jun 15, 2018
1 parent a6bbf14 commit 2854ea6
Show file tree
Hide file tree
Showing 3 changed files with 5,146 additions and 10 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# test-scenarios

Easily run the same unit test with different test data.
Easily run the same unit test with different test data.

Not tied to a specific library, it can be used with [mocha](https://mochajs.org/), [jasmine](https://jasmine.github.io/), [jest](https://facebook.github.io/jest/) and any library where the tests are defined within a function.
Not tied to a specific library, it can be used with

- [mocha](https://mochajs.org/)
- [jasmine](https://jasmine.github.io/)
- [jest](https://facebook.github.io/jest/)
- any library where tests are defined within a function.

## Example

Expand All @@ -14,9 +19,9 @@ export const sum = (a, b) => a + b;
import scenarios from "test-scenarios";

describe("sum", () => {
scenarios([
{ a: 1, b: 2, result: 3 },
{ a: -1, b: 1, result: 0 }
scenarios([
{ a: 1, b: 2, result: 3 },
{ a: -1, b: 1, result: 0 }
], ({ a, b, result }, testIndex) => {
describe(`When ${a} and ${b} are passed`, () => {
it(`should return ${result}`, () => {
Expand Down
Loading

0 comments on commit 2854ea6

Please sign in to comment.