Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Abstract jest config to dedicated file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- committed Apr 4, 2022
1 parent 578de7e commit ffcafdb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
17 changes: 17 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Config } from "@jest/types";
const config: Config.InitialOptions = {
collectCoverageFrom: ["<rootDir>/lib/**/*"],
globals: {
"ts-jest": {
tsconfig: "tsconfig.json",
},
},
moduleFileExtensions: ["ts", "js"],
transform: {
"^.+\\.ts$": "ts-jest",
},
testEnvironment: "node",
testRegex: "(/lib/.*(test|spec))\\.(js|ts)$",
};

export default config;
12 changes: 1 addition & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,7 @@
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
},
"jest": {
"collectCoverage": true,
"transform": {
"^.+\\.ts$": "ts-jest"
},
"testRegex": "(/lib/.*(test|spec))\\.(js|ts)$",
"moduleFileExtensions": [
"ts",
"js"
]
}
}

0 comments on commit ffcafdb

Please sign in to comment.