-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package.json): remove cjs support, update jest config
BREAKING CHANGE: esm support only
- Loading branch information
1 parent
6bc7d78
commit 32ad266
Showing
2 changed files
with
9 additions
and
3 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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
const mappedModule = process.env.TEST_ENV === 'prod' ? '<rootDir>/dist/$1' : '<rootDir>/src/$1'; | ||
|
||
module.exports = { | ||
preset: 'jest-config', | ||
testMatch: ['<rootDir>/src/**?(*.)+(spec|test).+(ts|tsx)'], | ||
moduleNameMapper: { | ||
'^@/(.*)\\.js$': mappedModule, | ||
}, | ||
testEnvironment: 'jsdom', | ||
}; |
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