-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Showing
11 changed files
with
606 additions
and
556 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Jest uses the `vm` module, which does not have production ready module support | ||
# yet. This option lets us use dynamic imports. | ||
node-options='--experimental-vm-modules' |
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,24 @@ | ||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
moduleDirectories: [ | ||
"node_modules", | ||
"build/js", | ||
], | ||
transform: { | ||
// Most of the build outputs in this project use UMD syntax, but the | ||
// utilities script is a proper ES Module. Unfortunately, Jest cannot treat | ||
// a file with a `.js` extension as ESM unless the whole project is ESM | ||
// (Jest does not use Node.js built-in resolution and loading logic), so | ||
// we have to set up special parsing for that file. | ||
// See also: https://jestjs.io/docs/next/ecmascript-modules | ||
"utils.js$": [ | ||
"babel-jest", | ||
{ | ||
plugins: [ | ||
"@babel/plugin-transform-modules-commonjs", | ||
"babel-plugin-add-module-exports", | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.