Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Consume Jest config terra (#86)
Browse files Browse the repository at this point in the history
* consume jest-config-terra and cache docker images

* oops, don't add this guy

* this was premature, we're not using terra-functional testing yet.
  • Loading branch information
mjhenkes authored Mar 25, 2021
1 parent 77d5ab3 commit 05af5cd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 47 deletions.
29 changes: 5 additions & 24 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
const jestConfig = require('@cerner/jest-config-terra');

module.exports = {
collectCoverageFrom: [
'packages/**/src/*.js',
'packages/**/src/*.jsx',
],
globalSetup: './jestGlobalSetup.js',
...jestConfig,
setupFiles: [
'raf/polyfill',
'./jestsetup.js',
],
testMatch: [
'**/jest/**/*.test.js?(x)',
'./jest.enzymeSetup.js',
],
roots: [process.cwd()],
snapshotSerializers: [
'./node_modules/enzyme-to-json/serializer',
],
moduleDirectories: [
'aggregated-translations',
'packages',
'node_modules',
'enzyme-to-json/serializer',
],
moduleNameMapper: {
'\\.(css|scss|svg)$': 'identity-obj-proxy',
},
testURL: 'http://localhost',
transform: {
'^.+\\.(js|jsx)$': './jestBabelTransform',
},
};
3 changes: 0 additions & 3 deletions jestsetup.js → jest.enzymeSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Enzyme.configure({ adapter: new Adapter() });
global.shallow = shallow;
global.render = render;
global.mount = mount;

const htmlTag = document.getElementsByTagName('html')[0];
htmlTag.setAttribute('dir', 'ltr');
12 changes: 0 additions & 12 deletions jestBabelTransform.js

This file was deleted.

5 changes: 0 additions & 5 deletions jestGlobalSetup.js

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
"@babel/runtime": "^7.10.4",
"@cerner/browserslist-config-terra": "^3.0.0",
"@cerner/eslint-config-terra": "^5.0.0",
"@cerner/jest-config-terra": "^1.0.0",
"@cerner/stylelint-config-terra": "^4.0.0",
"@cerner/terra-cli": "^1.0.0",
"@cerner/terra-open-source-scripts": "^1.0.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^24.8.0",
"babel-loader": "^8.1.0",
"babel-plugin-istanbul": "^6.0.0",
"babel-plugin-minify-replace": "^0.5.0",
Expand All @@ -82,8 +82,7 @@
"glob": "^7.1.1",
"html-webpack-plugin": "^4.3.0",
"husky": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.8.0",
"jest": "^26.6.3",
"jsdoc": "^3.6.4",
"lerna": "^3.22.1",
"link-parent-bin": "^1.0.0",
Expand Down

0 comments on commit 05af5cd

Please sign in to comment.