-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjest.config.js
More file actions
63 lines (63 loc) · 2.09 KB
/
jest.config.js
File metadata and controls
63 lines (63 loc) · 2.09 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
module.exports = {
testPathIgnorePatterns: [
"<rootDir>/node_modules/",
"<rootDir>/dist/",
"<rootDir>/e2e-playwright/",
"<rootDir>/projects/tags-input-demo/src/test.ts", // Ignore Karma setup file
],
projects: [
// Configuration for the library
{
displayName: "lib",
preset: "jest-preset-angular",
setupFilesAfterEnv: [
"<rootDir>/projects/angular-tags-input/src/setup-jest.ts",
],
testPathIgnorePatterns: [
"<rootDir>/node_modules/",
"<rootDir>/dist/",
"<rootDir>/e2e-playwright/",
"<rootDir>/projects/tags-input-demo/", // Ignore demo app tests for this project config
],
transform: {
"^.+\\.(ts|js|mjs|html|svg)$": [
"jest-preset-angular",
{
tsconfig:
"<rootDir>/projects/angular-tags-input/tsconfig.spec.json",
stringifyContentPathRegex: "\\.html$",
},
],
},
},
// Configuration for the demo application
{
displayName: "demo",
preset: "jest-preset-angular",
setupFilesAfterEnv: [
"<rootDir>/projects/tags-input-demo/src/setup-jest.ts", // Use demo-specific setup
],
testPathIgnorePatterns: [
"<rootDir>/node_modules/",
"<rootDir>/dist/",
"<rootDir>/e2e-playwright/",
"<rootDir>/projects/angular-tags-input/", // Ignore library tests for this project config
"<rootDir>/projects/tags-input-demo/src/test.ts", // Ignore Karma setup file specifically for demo project
],
transform: {
"^.+\\.(ts|js|mjs|html|svg)$": [
"jest-preset-angular",
{
tsconfig: "<rootDir>/projects/tags-input-demo/tsconfig.spec.json", // Use demo-specific tsconfig
stringifyContentPathRegex: "\\.html$",
},
],
},
moduleNameMapper: {
// Map the library's public API path for demo app tests
"^angular-tags-input$":
"<rootDir>/projects/angular-tags-input/src/public-api.ts",
},
},
],
};