generated from xddq/nodejs-typescript-modern-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathjest.config.cjs
37 lines (35 loc) · 1.27 KB
/
jest.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//@ts-check
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
/** @type {import('jest').Config} */
const config = {
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
coverageReporters: ["lcov", "text"],
collectCoverageFrom: [
"src/*.ts",
"!src/bin.ts", // this is just the 'executable' to run the program
"!**/node_modules/**",
"!**/dist/**",
"!**/*.(spec|test|d).ts",
],
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// Indicates which provider should be used to instrument code for coverage
coverageProvider: "v8",
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
// Indicates whether each individual test should be reported during the run
verbose: true,
testMatch: [
"**/test/**/*.[jt]s?(x)",
"!**/test/util/**/*.[jt]s?(x)",
"!**/test/fixture/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)",
],
};
module.exports = config;