-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): keep
testMatch
if old jest config contains it (#2618)
Closes #2616
- Loading branch information
Showing
4 changed files
with
141 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`config migrate should migrate preset if valid preset value is used 1`] = ` | ||
" | ||
No migration needed for given Jest configuration | ||
" | ||
`; | ||
|
||
exports[`config migrate should migrate preset if valid preset value is used 2`] = ` | ||
"\\"jest\\": { | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; | ||
|
||
exports[`config migrate should migrate preset if valid preset value is used 3`] = ` | ||
" | ||
No migration needed for given Jest configuration | ||
" | ||
`; | ||
|
||
exports[`config migrate should reset testMatch if testRegex is used 1`] = ` | ||
"\\"jest\\": { | ||
\\"testRegex\\": \\"foo-pattern\\", | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; | ||
|
||
exports[`config migrate should reset testMatch if testRegex is used 2`] = ` | ||
"\\"jest\\": { | ||
\\"testRegex\\": [ | ||
\\"foo-pattern\\" | ||
], | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; | ||
|
||
exports[`config migrate should reset testMatch if testRegex is used 3`] = ` | ||
"\\"jest\\": { | ||
\\"testRegex\\": [], | ||
\\"testMatch\\": [ | ||
\\"**/__tests__/**/*.(spec|test).[tj]s?(x)\\" | ||
], | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; | ||
|
||
exports[`config migrate should reset testMatch if testRegex is used 4`] = ` | ||
"\\"jest\\": { | ||
\\"testMatch\\": [ | ||
\\"**/__tests__/**/*.(spec|test).[tj]s?(x)\\" | ||
], | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; | ||
|
||
exports[`config migrate should reset testMatch if testRegex is used 5`] = ` | ||
"\\"jest\\": { | ||
\\"testRegex\\": \\"foo-pattern\\", | ||
\\"preset\\": \\"ts-jest\\" | ||
} | ||
" | ||
`; |
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