Skip to content

Commit a3b3744

Browse files
Chore: Improve jest configuration
1 parent 03586f5 commit a3b3744

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

config/jest.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"clean": "rimraf lib/ yarn-error.log npm-debug.log",
1010
"lint": "tslint --project .",
1111
"lint:fix": "tslint --fix --project .",
12-
"test": "jest --config ./config/jest.config.js",
13-
"test:watch": "jest --config ./config/jest.config.js --watch"
12+
"test": "jest",
13+
"start": "jest --watch"
1414
},
1515
"repository": {
1616
"type": "git",
@@ -58,5 +58,14 @@
5858
"hooks": {
5959
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
6060
}
61+
},
62+
"jest": {
63+
"preset": "ts-jest",
64+
"moduleNameMapper": {
65+
"\\.(css|less|sass|scss)$": "<rootDir>/tests/styleMock.js"
66+
},
67+
"setupFilesAfterEnv": [
68+
"<rootDir>tests/setupTests.js"
69+
]
6170
}
6271
}

0 commit comments

Comments
 (0)