Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move test above describe to fix circus
  • Loading branch information
mattphillips committed May 30, 2018
commit 88f6a661c36702f8481f1c7f8a8261d8258163ae
144 changes: 72 additions & 72 deletions e2e/__tests__/__snapshots__/each.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -182,124 +182,124 @@ exports[`shows the correct errors in stderr when failing tests 1`] = `

at __tests__/failure.test.js:40:18

template table describe fails on all rows expected a == b › fails
The word red contains the letter 'z'

expect(received).toBe(expected) // Object.is equality

Expected: \\"b\\"
Received: \\"a\\"
Expected: true
Received: false

50 | ({left, right}) => {
51 | it('fails ', () => {
> 52 | expect(left).toBe(right);
| ^
53 | });
54 | }
55 | );
45 | \\"The word %s contains the letter 'z'\\",
46 | word => {
> 47 | expect(/z/.test(word)).toBe(true);
| ^
48 | }
49 | );
50 |

at __tests__/failure.test.js:52:20
at __tests__/failure.test.js:47:28

template table describe fails on all rows expected c == d › fails
The word green contains the letter 'z'

expect(received).toBe(expected) // Object.is equality

Expected: \\"d\\"
Received: \\"c\\"
Expected: true
Received: false

50 | ({left, right}) => {
51 | it('fails ', () => {
> 52 | expect(left).toBe(right);
| ^
53 | });
54 | }
55 | );
45 | \\"The word %s contains the letter 'z'\\",
46 | word => {
> 47 | expect(/z/.test(word)).toBe(true);
| ^
48 | }
49 | );
50 |

at __tests__/failure.test.js:52:20
at __tests__/failure.test.js:47:28

array table describe fails on all rows expected a == b › fails
The word bean contains the letter 'z'

expect(received).toBe(expected) // Object.is equality

Expected: \\"b\\"
Received: \\"a\\"
Expected: true
Received: false

59 | (left, right) => {
60 | it('fails', () => {
> 61 | expect(left).toBe(right);
| ^
62 | });
63 | }
64 | );
45 | \\"The word %s contains the letter 'z'\\",
46 | word => {
> 47 | expect(/z/.test(word)).toBe(true);
| ^
48 | }
49 | );
50 |

at __tests__/failure.test.js:61:20
at __tests__/failure.test.js:47:28

array table describe fails on all rows expected c == d › fails
template table describe fails on all rows expected a == b › fails

expect(received).toBe(expected) // Object.is equality

Expected: \\"d\\"
Received: \\"c\\"
Expected: \\"b\\"
Received: \\"a\\"

59 | (left, right) => {
60 | it('fails', () => {
> 61 | expect(left).toBe(right);
57 | ({left, right}) => {
58 | it('fails ', () => {
> 59 | expect(left).toBe(right);
| ^
62 | });
63 | }
64 | );
60 | });
61 | }
62 | );

at __tests__/failure.test.js:61:20
at __tests__/failure.test.js:59:20

The word red contains the letter 'z'
template table describe fails on all rows expected c == d › fails

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false
Expected: \\"d\\"
Received: \\"c\\"

67 | \\"The word %s contains the letter 'z'\\",
68 | word => {
> 69 | expect(/z/.test(word)).toBe(true);
| ^
70 | }
71 | );
72 |
57 | ({left, right}) => {
58 | it('fails ', () => {
> 59 | expect(left).toBe(right);
| ^
60 | });
61 | }
62 | );

at __tests__/failure.test.js:69:28
at __tests__/failure.test.js:59:20

The word green contains the letter 'z'
array table describe fails on all rows expected a == b › fails

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false
Expected: \\"b\\"
Received: \\"a\\"

67 | \\"The word %s contains the letter 'z'\\",
68 | word => {
> 69 | expect(/z/.test(word)).toBe(true);
| ^
66 | (left, right) => {
67 | it('fails', () => {
> 68 | expect(left).toBe(right);
| ^
69 | });
70 | }
71 | );
72 |

at __tests__/failure.test.js:69:28
at __tests__/failure.test.js:68:20

The word bean contains the letter 'z'
array table describe fails on all rows expected c == d › fails

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false
Expected: \\"d\\"
Received: \\"c\\"

67 | \\"The word %s contains the letter 'z'\\",
68 | word => {
> 69 | expect(/z/.test(word)).toBe(true);
| ^
66 | (left, right) => {
67 | it('fails', () => {
> 68 | expect(left).toBe(right);
| ^
69 | });
70 | }
71 | );
72 |

at __tests__/failure.test.js:69:28
at __tests__/failure.test.js:68:20

"
`;
14 changes: 7 additions & 7 deletions e2e/each/__tests__/failure.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ it.each`
}
);

test.each(['red', 'green', 'bean'])(
"The word %s contains the letter 'z'",
word => {
expect(/z/.test(word)).toBe(true);
}
);

describe.each`
left | right
${'a'} | ${'b'}
Expand All @@ -62,10 +69,3 @@ describe.each([['a', 'b'], ['c', 'd']])(
});
}
);

test.each(['red', 'green', 'bean'])(
"The word %s contains the letter 'z'",
word => {
expect(/z/.test(word)).toBe(true);
}
);