1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-26 11:49:04 +01:00

isolate jest config

This commit is contained in:
Matthias Kretschmann 2020-07-02 20:32:16 +02:00
parent 172fb77976
commit d437a40678
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,8 @@
module.exports = { module.exports = {
rootDir: '../',
transform: {
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './jest/babel.config.js' }]
},
moduleNameMapper: { moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy', '.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':

View File

@ -10,8 +10,8 @@
"start": "gatsby develop --host 0.0.0.0", "start": "gatsby develop --host 0.0.0.0",
"build": "gatsby build && npm run copy", "build": "gatsby build && npm run copy",
"ssr": "npm run build && serve -s public/", "ssr": "npm run build && serve -s public/",
"test": "npm run lint && jest --coverage --silent", "test": "npm run lint && jest -c jest/jest.config.js --coverage --silent",
"test:watch": "npm run lint && jest --coverage --watch", "test:watch": "npm run lint && jest -c jest/jest.config.js --coverage --watch",
"copy": "cp -R content/media/ public", "copy": "cp -R content/media/ public",
"lint": "run-p --continue-on-error lint:js lint:css lint:md", "lint": "run-p --continue-on-error lint:js lint:css lint:md",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .", "lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .",