1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-01 09:37:37 +01:00

test fixes

This commit is contained in:
Matthias Kretschmann 2021-03-13 17:46:54 +01:00
parent 04f51eb0d7
commit f98816ca8c
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,7 @@
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@welldone-software/why-did-you-render": "^6.1.1",
"babel-preset-gatsby": "^1.0.0",
"chalk": "^4.1.0",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",

4
tests/babel.config.js Normal file
View File

@ -0,0 +1,4 @@
// this file only exists for Jest
module.exports = {
presets: ['babel-preset-gatsby']
}

View File

@ -1,5 +1,8 @@
module.exports = {
rootDir: '../',
transform: {
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './tests/babel.config.js' }]
},
moduleNameMapper: {
'.+\\.(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)$':