generated from concord-consortium/codap-plugin-starter-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
38 lines (35 loc) · 986 Bytes
/
jest.config.ts
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
38
import type {Config} from "jest";
import { createDefaultEsmPreset } from "ts-jest";
const tsJestPreset = createDefaultEsmPreset();
const config: Config = {
...tsJestPreset,
// The default coverage provider is babel, but we need to use v8
// because babel didn't handle the `import ... with {}` syntax
coverageProvider: "v8",
setupFilesAfterEnv: [
"<rootDir>/src/test/setupTests.ts"
],
testEnvironment: "jsdom",
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
testPathIgnorePatterns: [
"/node_modules/",
"/playwright/"
],
coveragePathIgnorePatterns: [
"/node_modules/",
"src/utilities/test-utils.ts"
],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
},
moduleFileExtensions: [
"ts",
"tsx",
"js",
"jsx",
"json"
]
};
export default config;