-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: vest.skipWhen for conditional test exclusion (#611)
- Loading branch information
Showing
21 changed files
with
280 additions
and
112 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import createCache from 'cache'; | ||
import context from 'ctx'; | ||
import genTestsSummary from 'genTestsSummary'; | ||
|
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
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
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
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
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
45 changes: 45 additions & 0 deletions
45
packages/vest/src/hooks/__tests__/__snapshots__/exclusive.test.js.snap
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,45 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`exclusive hooks \`skipWhen\` hook When \`shouldSkip\` is \`false\` Should produce correct validation result 1`] = ` | ||
Object { | ||
"done": [Function], | ||
"errorCount": 3, | ||
"getErrors": [Function], | ||
"getErrorsByGroup": [Function], | ||
"getWarnings": [Function], | ||
"getWarningsByGroup": [Function], | ||
"groups": Object { | ||
"group": Object { | ||
"field2": Object { | ||
"errorCount": 1, | ||
"testCount": 1, | ||
"warnCount": 0, | ||
}, | ||
}, | ||
}, | ||
"hasErrors": [Function], | ||
"hasErrorsByGroup": [Function], | ||
"hasWarnings": [Function], | ||
"hasWarningsByGroup": [Function], | ||
"name": undefined, | ||
"testCount": 3, | ||
"tests": Object { | ||
"field1": Object { | ||
"errorCount": 1, | ||
"testCount": 1, | ||
"warnCount": 0, | ||
}, | ||
"field2": Object { | ||
"errorCount": 1, | ||
"testCount": 1, | ||
"warnCount": 0, | ||
}, | ||
"field3": Object { | ||
"errorCount": 1, | ||
"testCount": 1, | ||
"warnCount": 0, | ||
}, | ||
}, | ||
"warnCount": 0, | ||
} | ||
`; |
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
Oops, something went wrong.