Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@
},
"devDependencies": {
"@babel/parser": "^7.5.5",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/types": "^7.5.5",
"@elastic/elasticsearch": "^7.4.0",
"@elastic/eslint-config-kibana": "0.15.0",
Expand Down Expand Up @@ -390,7 +389,6 @@
"axe-core": "^3.4.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-dynamic-import-node": "^2.3.0",
"babel-plugin-istanbul": "^5.2.0",
"backport": "4.9.0",
"chai": "3.5.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/dev/jest/babel_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ module.exports = babelJest.createTransformer({
},
],
],
plugins: [
// enables jest to parse and execute dynamic import() calls
'@babel/plugin-syntax-dynamic-import',
'dynamic-import-node',
],
});
6 changes: 4 additions & 2 deletions src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default {
'!src/legacy/ui/public/{agg_types,vis}/**/*.d.ts',
],
moduleNameMapper: {
'@elastic/eui$': '<rootDir>/node_modules/@elastic/eui/test-env',
'@elastic/eui/lib/(.*)?': '<rootDir>/node_modules/@elastic/eui/test-env/$1',
'^src/plugins/(.*)': '<rootDir>/src/plugins/$1',
'^plugins/([^/.]*)(.*)': '<rootDir>/src/legacy/core_plugins/$1/public$2',
'^ui/(.*)': '<rootDir>/src/legacy/ui/public/$1',
Expand Down Expand Up @@ -88,9 +90,9 @@ export default {
'^.+\\.html?$': 'jest-raw-loader',
},
transformIgnorePatterns: [
// ignore all node_modules except @elastic/eui and monaco-editor which both require babel transforms to handle dynamic import()
// ignore all node_modules except monaco-editor which requires babel transforms to handle dynamic import()
// since ESM modules are not natively supported in Jest yet (https://github.com/facebook/jest/issues/4842)
'[/\\\\]node_modules(?![\\/\\\\]@elastic[\\/\\\\]eui)(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$',
'[/\\\\]node_modules(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$',
'packages/kbn-pm/dist/index.js',
],
snapshotSerializers: [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading