mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 06:04:29 +00:00
Update front-end jest config
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
451589f875
commit
c86e1dfb18
@ -6,6 +6,6 @@ module.exports = {
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'babel-plugin-styled-components',
|
||||
'@babel/plugin-transform-modules-commonjs',
|
||||
].map(require.resolve),
|
||||
};
|
||||
|
||||
@ -32,8 +32,13 @@ module.exports = {
|
||||
'<rootDir>/test/config/front/mocks/image.js',
|
||||
},
|
||||
rootDir: process.cwd(),
|
||||
setupFilesAfterEnv: ['<rootDir>/test/config/front/test-bundler.js'],
|
||||
setupFiles: [
|
||||
setupFiles: ['<rootDir>/test/config/front/test-bundler.js'],
|
||||
testPathIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
'<rootDir>/examples/getstarted/',
|
||||
'<rootDir>/packages/strapi-helper-plugin/dist/',
|
||||
],
|
||||
setupFilesAfterEnv: [
|
||||
'<rootDir>/test/config/front/enzyme-setup.js',
|
||||
'<rootDir>/test/config/front/strapi.js',
|
||||
],
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
"private": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
|
||||
"@testing-library/jest-dom": "^4.0.0",
|
||||
"@testing-library/react": "^9.1.0",
|
||||
"@testing-library/react-hooks": "^2.0.0",
|
||||
"babel-eslint": "^10.0.0",
|
||||
"babel-plugin-styled-components": "^1.10.7",
|
||||
"chokidar": "3.3.1",
|
||||
"cross-env": "^5.2.0",
|
||||
"cypress": "3.1.2",
|
||||
@ -29,6 +29,7 @@
|
||||
"istanbul": "~0.4.2",
|
||||
"jest": "^24.5.0",
|
||||
"jest-cli": "^24.5.0",
|
||||
"jest-styled-components": "^7.0.0",
|
||||
"lerna": "^3.13.1",
|
||||
"lint-staged": "^9.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
|
||||
@ -12,8 +12,5 @@
|
||||
],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"babel-plugin-styled-components"
|
||||
]
|
||||
"plugins": ["@babel/plugin-proposal-class-properties"]
|
||||
}
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"babel-plugin-styled-components": "^1.10.7",
|
||||
"enzyme": "^3.8.0",
|
||||
"enzyme-adapter-react-16": "^1.8.0",
|
||||
"rimraf": "3.0.0",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const configure = require('enzyme').configure;
|
||||
const Adapter = require('enzyme-adapter-react-16');
|
||||
import 'jest-styled-components';
|
||||
import { configure } from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
configure({
|
||||
adapter: new Adapter(),
|
||||
|
||||
11
yarn.lock
11
yarn.lock
@ -4102,7 +4102,7 @@ babel-plugin-macros@^2.0.0:
|
||||
cosmiconfig "^6.0.0"
|
||||
resolve "^1.12.0"
|
||||
|
||||
"babel-plugin-styled-components@>= 1", babel-plugin-styled-components@^1.10.7:
|
||||
"babel-plugin-styled-components@>= 1":
|
||||
version "1.10.7"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz#3494e77914e9989b33cc2d7b3b29527a949d635c"
|
||||
integrity sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg==
|
||||
@ -5833,7 +5833,7 @@ css.escape@^1.5.1:
|
||||
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
|
||||
integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=
|
||||
|
||||
css@^2.2.3:
|
||||
css@^2.2.3, css@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
|
||||
integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==
|
||||
@ -10235,6 +10235,13 @@ jest-snapshot@^24.9.0:
|
||||
pretty-format "^24.9.0"
|
||||
semver "^6.2.0"
|
||||
|
||||
jest-styled-components@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-styled-components/-/jest-styled-components-7.0.0.tgz#3e1b7dcd077800ea5191e1cc95b314917a2ed668"
|
||||
integrity sha512-A1nl8q1ptZj1t5wd0x/UYjnqfld1GhZwRDPS9w0eD5P5R8G+Q4uHaBAbUjf+Arjexqh2BxfrGkTc3tDuhtdifg==
|
||||
dependencies:
|
||||
css "^2.2.4"
|
||||
|
||||
jest-util@^24.9.0:
|
||||
version "24.9.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user