Updating NPM dependencies
This commit is contained in:
157
node_modules/jest-each/README.md
generated
vendored
157
node_modules/jest-each/README.md
generated
vendored
@@ -19,6 +19,12 @@ jest-each allows you to provide multiple arguments to your `test`/`describe` whi
|
||||
- Also under the aliases: `.it.only` or `.fit`
|
||||
- `.test.skip` to skip the parameterised tests
|
||||
- Also under the aliases: `.it.skip` or `.xit` or `.xtest`
|
||||
- `.test.concurrent`
|
||||
- Also under the alias: `.it.concurrent`
|
||||
- `.test.concurrent.only`
|
||||
- Also under the alias: `.it.concurrent.only`
|
||||
- `.test.concurrent.skip`
|
||||
- Also under the alias: `.it.concurrent.skip`
|
||||
- `.describe` to runs test suites with parameterised data
|
||||
- `.describe.only` to only run the parameterised suite of tests
|
||||
- Also under the aliases: `.fdescribe`
|
||||
@@ -143,12 +149,13 @@ const each = require('jest-each').default;
|
||||
Alias: `.it(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test(
|
||||
'returns the result of adding %d to %d',
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
},
|
||||
);
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test('returns the result of adding %d to %d', (a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
```
|
||||
|
||||
#### `.test.only(name, fn)`
|
||||
@@ -156,12 +163,13 @@ each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test(
|
||||
Aliases: `.it.only(name, fn)` or `.fit(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test.only(
|
||||
'returns the result of adding %d to %d',
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
},
|
||||
);
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test.only('returns the result of adding %d to %d', (a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
```
|
||||
|
||||
#### `.test.skip(name, fn)`
|
||||
@@ -169,7 +177,59 @@ each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test.only(
|
||||
Aliases: `.it.skip(name, fn)` or `.xit(name, fn)` or `.xtest(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test.skip(
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test.skip('returns the result of adding %d to %d', (a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
```
|
||||
|
||||
#### `.test.concurrent(name, fn)`
|
||||
|
||||
Aliases: `.it.concurrent(name, fn)`
|
||||
|
||||
```js
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test.concurrent(
|
||||
'returns the result of adding %d to %d',
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
},
|
||||
);
|
||||
```
|
||||
|
||||
#### `.test.concurrent.only(name, fn)`
|
||||
|
||||
Aliases: `.it.concurrent.only(name, fn)`
|
||||
|
||||
```js
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test.concurrent.only(
|
||||
'returns the result of adding %d to %d',
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
},
|
||||
);
|
||||
```
|
||||
|
||||
#### `.test.concurrent.skip(name, fn)`
|
||||
|
||||
Aliases: `.it.concurrent.skip(name, fn)`
|
||||
|
||||
```js
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).test.concurrent.skip(
|
||||
'returns the result of adding %d to %d',
|
||||
(a, b, expected) => {
|
||||
expect(a + b).toBe(expected);
|
||||
@@ -197,24 +257,25 @@ each([['hello'], ['mr'], ['spy']]).test(
|
||||
#### `.describe(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe(
|
||||
'.add(%d, %d)',
|
||||
(a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).describe('.add(%d, %d)', (a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
|
||||
test('does not mutate first arg', () => {
|
||||
a + b;
|
||||
expect(a).toBe(a);
|
||||
});
|
||||
test('does not mutate first arg', () => {
|
||||
a + b;
|
||||
expect(a).toBe(a);
|
||||
});
|
||||
|
||||
test('does not mutate second arg', () => {
|
||||
a + b;
|
||||
expect(b).toBe(b);
|
||||
});
|
||||
},
|
||||
);
|
||||
test('does not mutate second arg', () => {
|
||||
a + b;
|
||||
expect(b).toBe(b);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
#### `.describe.only(name, fn)`
|
||||
@@ -222,14 +283,15 @@ each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe(
|
||||
Aliases: `.fdescribe(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe.only(
|
||||
'.add(%d, %d)',
|
||||
(a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
},
|
||||
);
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).describe.only('.add(%d, %d)', (a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
#### `.describe.skip(name, fn)`
|
||||
@@ -237,14 +299,15 @@ each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe.only(
|
||||
Aliases: `.xdescribe(name, fn)`
|
||||
|
||||
```js
|
||||
each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe.skip(
|
||||
'.add(%d, %d)',
|
||||
(a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
},
|
||||
);
|
||||
each([
|
||||
[1, 1, 2],
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
]).describe.skip('.add(%d, %d)', (a, b, expected) => {
|
||||
test(`returns ${expected}`, () => {
|
||||
expect(a + b).toBe(expected);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
@@ -268,7 +331,7 @@ each`
|
||||
|
||||
##### `each` takes a tagged template string with:
|
||||
|
||||
- First row of variable name column headings seperated with `|`
|
||||
- First row of variable name column headings separated with `|`
|
||||
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
|
||||
|
||||
##### `.test`:
|
||||
@@ -304,7 +367,7 @@ each`
|
||||
|
||||
##### `each` takes a tagged template string with:
|
||||
|
||||
- First row of variable name column headings seperated with `|`
|
||||
- First row of variable name column headings separated with `|`
|
||||
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
|
||||
|
||||
##### `.describe`:
|
||||
|
||||
Reference in New Issue
Block a user