Add Jest setup to site
This commit is contained in:
parent
4bf37101ec
commit
7bca0b2028
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"presets": ["next/babel"]
|
||||
}
|
|
@ -9,6 +9,7 @@ plugins:
|
|||
env:
|
||||
browser: true
|
||||
node: true
|
||||
jest: true
|
||||
settings:
|
||||
react:
|
||||
version: "detect"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export default "test-file-mock";
|
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
|
||||
watchPlugins: [
|
||||
'jest-watch-typeahead/filename',
|
||||
'jest-watch-typeahead/testname',
|
||||
],
|
||||
moduleNameMapper: {
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
'<rootDir>/__mocks__/fileMock.js',
|
||||
'\\.(css|scss)$': 'identity-obj-proxy',
|
||||
},
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "jironis-react-next",
|
||||
"name": "skolplattformen-site",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
|
@ -21,14 +21,23 @@
|
|||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint './**/*.js'"
|
||||
"lint": "eslint './**/*.js'",
|
||||
"test": "is-ci test:ci test:watch",
|
||||
"test:ci": "jest",
|
||||
"test:watch": "jest --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "5.11.9",
|
||||
"@testing-library/react": "11.2.5",
|
||||
"babel-eslint": "10.1.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-prettier": "3.3.1",
|
||||
"eslint-plugin-react": "7.22.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"is-ci-cli": "2.2.0",
|
||||
"jest": "26.6.3",
|
||||
"jest-watch-typeahead": "0.6.1",
|
||||
"prettier": "2.2.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue