Skip to content

Commit

Permalink
chore: jest config for esm
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Apr 25, 2020
1 parent f452ffd commit 7a5a56b
Show file tree
Hide file tree
Showing 4 changed files with 311 additions and 60 deletions.
13 changes: 13 additions & 0 deletions packages/x6/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
plugins: ['transform-es2015-modules-commonjs'],
}
3 changes: 2 additions & 1 deletion packages/x6/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ module.exports = {
// verbose: true,
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
transform: { '^.+\\.ts$': 'ts-jest' },
transform: { '^.+\\.js$': 'babel-jest', '^.+\\.ts$': 'ts-jest' },
testMatch: ['**/src/**/*.test.ts', '**/src/**/*.spec.ts'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
// collectCoverage: true,
coverageReporters: ['lcov', 'text-summary'],
coverageDirectory: './test/coverage',
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es)'],
}
6 changes: 4 additions & 2 deletions packages/x6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,18 @@
"utility-types": "^3.10.0"
},
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.8.3",
"@types/jest": "^24.0.17",
"@types/jquery": "^3.3.31",
"@types/lodash-es": "^4.17.3",
"@types/node": "^13.9.1",
"@types/sinon": "^7.5.0",
"@types/webpack": "^4.41.7",
"babel-jest": "^25.4.0",
"babel-loader": "^8.0.6",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"base64-img": "^1.0.4",
"coveralls": "^3.0.6",
"eslint": "^6.1.0",
Expand Down

0 comments on commit 7a5a56b

Please sign in to comment.