Skip to content

Commit

Permalink
- tweaking maxworkers for travis and specifying coverageDirectory for…
Browse files Browse the repository at this point in the history
… codecov

- remove dynamic import in shim.js now that it is set in babelrc for tests only.
  • Loading branch information
xtinec committed Oct 13, 2018
1 parent c4fc33c commit 1dfe55f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions superset/assets/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ module.exports = {
setupTestFrameworkScriptFile: '<rootDir>/spec/helpers/shim.js',
testURL: 'http://localhost',
collectCoverageFrom: ['src/**/*.{js,jsx}'],
coverageDirectory: '<rootDir>/coverage/',
};
2 changes: 1 addition & 1 deletion superset/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"tdd": "jest --watch",
"test": "jest",
"cover": "jest --runInBand --logHeapUsage --coverage",
"cover": "jest --maxWorkers=8 --coverage",
"dev": "webpack --mode=development --colors --progress --debug --watch",
"dev-server": "webpack-dev-server --mode=development --progress",
"prod": "node --max_old_space_size=4096 webpack --mode=production --colors --progress",
Expand Down
7 changes: 0 additions & 7 deletions superset/assets/spec/helpers/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });

require('babel-register')({
// NOTE: If `dynamic-import-node` is in .babelrc alongside
// `syntax-dynamic-import` it breaks webpack's bundle splitting capability.
// So only load during runtime on the node-side (in tests)
plugins: ['dynamic-import-node'],
});

const exposedProperties = ['window', 'navigator', 'document'];

global.jsdom = jsdom.jsdom;
Expand Down

0 comments on commit 1dfe55f

Please sign in to comment.