forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.tz.unit.conf.js
More file actions
71 lines (69 loc) · 1.89 KB
/
jest.tz.unit.conf.js
File metadata and controls
71 lines (69 loc) · 1.89 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
64
65
66
67
68
69
70
71
// @ts-check
const esmPackages = [
"ccount",
"character-entities-html4",
"comma-separated-tokens",
"csv-parse",
"d3-*",
"d3",
"devlop",
"echarts",
"fetch-mock",
"hast.*",
"html-void-elements",
"is-absolute-url",
"jose",
"property-information",
"rehype-external-links",
"space-separated-tokens",
"stringify-entities",
"unist-util-visit-parents",
"unist-util-visit",
"vfile-location",
"vfile-message",
"vfile",
"web-namespaces",
"zrender",
"zwitch",
];
/** @type {import('jest').Config} */
module.exports = {
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/frontend/test/__mocks__/styleMock.js",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/frontend/test/__mocks__/fileMock.js",
"^cljs/(.*)$": "<rootDir>/target/cljs_dev/$1",
"^d3-(.*)$": "<rootDir>/node_modules/d3-$1/dist/d3-$1",
"react-markdown":
"<rootDir>/node_modules/react-markdown/react-markdown.min.js",
"\\.svg\\?(component|source)":
"<rootDir>/frontend/test/__mocks__/svgMock.jsx",
},
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!(${esmPackages.join("|")})/)`,
],
testMatch: ["<rootDir>/frontend/**/*.tz.unit.spec.{js,ts,jsx,tsx}"],
modulePaths: [
"<rootDir>/frontend/test",
"<rootDir>/frontend/src",
"<rootDir>/enterprise/frontend/src",
],
setupFiles: [
"<rootDir>/frontend/test/jest-setup.js",
"<rootDir>/frontend/test/metabase-bootstrap.js",
"<rootDir>/frontend/test/register-visualizations.js",
],
globals: {
ace: {},
ga: {},
},
coverageDirectory: "./",
coverageReporters: ["text", "json-summary"],
collectCoverageFrom: ["frontend/src/**/*.{js,ts,jsx,tsx}"],
coveragePathIgnorePatterns: [
"/node_modules/",
"/frontend/src/metabase/visualizations/lib/errors.js",
],
testEnvironment: "jest-environment-jsdom",
testTimeout: 30000,
};