-
Notifications
You must be signed in to change notification settings - Fork 47.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make tests compatible with Jest 24 (#15779)
* chore: make tests compatible with Jest 24 * remove fake rafs * rollback jsdom for localstorage compat * Apply suggestions from code review Co-Authored-By: Sunil Pai <[email protected]> * chore: cleanup lockfile
- Loading branch information
Showing
9 changed files
with
833 additions
and
897 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,11 @@ module.exports = { | |
collectCoverageFrom: ['packages/**/*.js'], | ||
timers: 'fake', | ||
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')], | ||
// Jest changed from `about:blank` to `http://localhost` default in 24.5 (https://github.com/facebook/jest/pull/6792) | ||
// in order to address https://github.com/facebook/jest/issues/6766. If one uses `about:blank` in [email protected] or | ||
// newer, it fails with `SecurityError: localStorage is not available for opaque origins`. However, some of React's | ||
// tests depend on `about:blank` being the domain (for e.g. `url` in `img` tags). So we set `about:blank` here to | ||
// keep the current behavior and make sure to keep the version of JSDOM to version lower than 11.12. This will have | ||
// to be addressed properly when Jest 25 is released, as it will come with a newer version of JSDOM. | ||
testURL: 'about:blank', | ||
}; |
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 |
---|---|---|
|
@@ -69,7 +69,7 @@ module.exports = { | |
} | ||
: {} | ||
) | ||
).code; | ||
); | ||
} | ||
return src; | ||
}, | ||
|
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.