-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
38 lines (36 loc) · 1.07 KB
/
jest.config.js
File metadata and controls
38 lines (36 loc) · 1.07 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
// force timezone to UTC to allow tests to work regardless of local timezone
// generally used by snapshots, but can affect specific tests
process.env.TZ = "UTC";
const {
grafanaESModules,
nodeModulesToTransform,
} = require("./.config/jest/utils");
module.exports = {
// Jest configuration provided by Grafana scaffolding
...require("./.config/jest.config"),
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!**/node_modules/**",
"!**/__mocks__/**",
"!**/__tests__/**",
],
testMatch: [
//"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test,jest}.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test,jest}.{js,jsx,ts,tsx}",
],
coverageReporters: ["html", "text", "text-summary", "cobertura"],
// Transform ESM packages that are now used by @grafana packages
transformIgnorePatterns: [
nodeModulesToTransform([
...grafanaESModules,
"marked",
"react-calendar",
"react-date-picker",
"get-user-locale",
"memoize",
"mimic-function",
"@wojtekmaj",
]),
],
};