[CHORE] Configure Test env. Add enzyme-to-json snapshot serializer
This commit is contained in:
parent
ad720a8baf
commit
ae6ca2bf5c
6 changed files with 14 additions and 23 deletions
|
@ -15,7 +15,10 @@
|
|||
},
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"project": ["./tsconfig.json", "./src/setupTests.ts"]
|
||||
"project": [
|
||||
"./tsconfig.json",
|
||||
"./src/setupTests.ts"
|
||||
]
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "prettier"],
|
||||
"extends": [
|
||||
|
@ -30,7 +33,8 @@
|
|||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"@typescript-eslint/no-explicit-any": "error"
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
module.exports = {
|
||||
roots: ['<rootDir>/src'],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': 'ts-jest',
|
||||
},
|
||||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
};
|
8
kafka-ui-react-app/package-lock.json
generated
8
kafka-ui-react-app/package-lock.json
generated
|
@ -2081,14 +2081,6 @@
|
|||
"@types/node": "*",
|
||||
"@types/yargs": "^15.0.0",
|
||||
"chalk": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "14.14.22",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
|
||||
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/types": "^26.6.2",
|
||||
"@testing-library/jest-dom": "^5.11.9",
|
||||
"@testing-library/react": "^9.5.0",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
|
@ -108,5 +109,8 @@
|
|||
"engines": {
|
||||
"node": ">=14.15.4"
|
||||
},
|
||||
"proxy": "http://localhost:8080"
|
||||
"proxy": "http://localhost:8080",
|
||||
"jest": {
|
||||
"snapshotSerializers": ["enzyme-to-json/serializer"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable */
|
||||
import * as Enzyme from 'enzyme';
|
||||
import { configure } from 'enzyme';
|
||||
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
configure({ adapter: new Adapter() });
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
"src",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue