-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30ebfb5
commit 37b53c6
Showing
9 changed files
with
210 additions
and
109 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
integration-tests/test-each/__tests__/each-exception.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
it.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | | ||
`( | ||
'throws exception when not enough arguments are supplied $left == $right', | ||
({left, right}) => { | ||
expect(left).toBe(right); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
it.only.each([[true, true], [true, true]])( | ||
'passes one row expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.each([[true, false], [true, true]])( | ||
'Should not be ran: fails all rows expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.only.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | ${true} | ||
`('passes one row expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${false} | ||
${true} | ${false} | ||
`( | ||
'Should not be ran: fails all rows expected $left == $right', | ||
({left, right}) => { | ||
expect(left).toBe(right); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
it.each([[true, true], [true, true]])( | ||
'passes one row expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.skip.each([[true, false], [true, true]])( | ||
'Should not be ran: fails all rows expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | ${true} | ||
`('passes one row expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
it.skip.each` | ||
left | right | ||
${true} | ${false} | ||
${true} | ${false} | ||
`( | ||
'Should not be ran: fails all rows expected $left == $right', | ||
({left, right}) => { | ||
expect(left).toBe(right); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
it.each([[true, true], [true, false]])( | ||
'fails one row expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.each([[true, false], [true, false]])( | ||
'fails all rows expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
describe.each([[false, true], [true, false]])( | ||
'fails all rows expected %s == %s', | ||
(left, right) => { | ||
it('fails', () => { | ||
expect(left).toBe(right); | ||
}); | ||
} | ||
); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${false} | ||
${true} | ${true} | ||
`('fails one row expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${false} | ||
${true} | ${true} | ||
`('fails all rows expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
describe.each` | ||
left | right | ||
${true} | ${false} | ||
${false} | ${true} | ||
`('fails all rows expected $left == $right', ({left, right}) => { | ||
it('fails ', () => { | ||
expect(left).toBe(right); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
it.each([[true, true], [true, true]])( | ||
'passes one row expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
it.each([[true, true], [true, true]])( | ||
'passes all rows expected %s == %s', | ||
(left, right) => { | ||
expect(left).toBe(right); | ||
} | ||
); | ||
|
||
describe.each([[true, true], [true, true]])( | ||
'passes all rows expected %s == %s', | ||
(left, right) => { | ||
it('passes', () => { | ||
expect(left).toBe(right); | ||
}); | ||
} | ||
); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | ${true} | ||
`('passes one row expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
it.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | ${true} | ||
`('passes all rows expected $left == $right', ({left, right}) => { | ||
expect(left).toBe(right); | ||
}); | ||
|
||
describe.each` | ||
left | right | ||
${true} | ${true} | ||
${true} | ${true} | ||
`('passes all rows expected $left == $right', ({left, right}) => { | ||
it('passes ', () => { | ||
expect(left).toBe(right); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"jest": { | ||
"testEnvironment": "node" | ||
} | ||
} |
16 changes: 0 additions & 16 deletions
16
packages/jest-jasmine2/src/__tests__/integration/each-only.test.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/jest-jasmine2/src/__tests__/integration/each-skip.test.js
This file was deleted.
Oops, something went wrong.
77 changes: 0 additions & 77 deletions
77
packages/jest-jasmine2/src/__tests__/integration/each.test.js
This file was deleted.
Oops, something went wrong.