-
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.
Add CJS bundles to core libs for testing, provide better Jest guidance (
#1460) * test: add cjs to the distributions so that we can give better prescriptions for testing with jest * test: add a note about using the modulenamemapper when testing in Jest
- Loading branch information
1 parent
465344e
commit f1198ff
Showing
5 changed files
with
42 additions
and
7 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,19 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-typescript', | ||
'@babel/preset-react', | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
modules: 'cjs', | ||
targets: { | ||
browsers: ['>0.25%, not dead'], | ||
}, | ||
}, | ||
], | ||
], | ||
plugins: [ | ||
'@babel/proposal-class-properties', | ||
'@babel/proposal-object-rest-spread', | ||
], | ||
} |
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
2 changes: 1 addition & 1 deletion
2
packages/core/react-dnd/src/decorators/__tests__/ConnectorFunctions.spec.tsx
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,5 @@ | ||
#!/bin/sh | ||
npx babel --config-file=../../../babel.config.js src --ignore="src/**/__tests__/**" --out-dir lib --extensions '.ts,.tsx' & | ||
npx babel --config-file=../../../babel.config.cjs.js src --ignore="src/**/__tests__/**" --out-dir dist/cjs --extensions '.ts,.tsx' & | ||
npx tsc & | ||
wait |