Skip to content

Commit 588e22d

Browse files
nstepienamanmahajan7
authored andcommitted
Reorganize tests (adazzle#1878)
* Reorganize tests * consistent describe, merge column utils tests
1 parent f4e3804 commit 588e22d

37 files changed

+328
-340
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ module.exports = {
579579
}, {
580580
// TODO: remove
581581
files: [
582-
'src/**/__tests__/**/*'
582+
'*.test.*'
583583
],
584584
rules: {
585585
'sonarjs/no-identical-functions': 0

jest.config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ module.exports = {
2121
],
2222
restoreMocks: true,
2323
moduleNameMapper: {
24-
'^@material-ui/icons$': '<rootDir>/test/iconsMock.ts'
24+
'^@material-ui/icons$': '<rootDir>/jest/iconsMock.ts'
2525
},
2626
setupFiles: [
27-
'<rootDir>/test/setupTests.ts'
27+
'<rootDir>/jest/setupTests.ts'
2828
],
2929
testMatch: [
30-
'<rootDir>/src/**/*.spec.(ts|tsx)',
31-
'<rootDir>/test/**/*.test.(ts|tsx)'
30+
'<rootDir>/src/**/*.test.*'
3231
]
3332
};
File renamed without changes.

test/setupTests.ts renamed to jest/setupTests.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import enzyme from 'enzyme';
22
import Adapter from 'enzyme-adapter-react-16';
33

44
enzyme.configure({
5-
adapter: new Adapter(),
6-
disableLifecycleMethods: true
5+
adapter: new Adapter()
76
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"postbuild": "node tools/buildStylesheets.mjs",
3030
"test": "jest",
3131
"test:watch": "jest --watch",
32-
"eslint": "eslint --ext js,mjs,ts,tsx --max-warnings 0 -f codeframe --cache --color examples src test tools",
32+
"eslint": "eslint --ext js,mjs,ts,tsx --max-warnings 0 -f codeframe --cache --color examples src jest tools",
3333
"eslint:fix": "npm run eslint -- --fix",
3434
"typecheck": "tsc -p tsconfig.all.json",
3535
"prepublishOnly": "npm install && npm run build",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)