-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathjest.config.js
More file actions
20 lines (17 loc) · 853 Bytes
/
jest.config.js
File metadata and controls
20 lines (17 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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');
// Add d3-scale-chromatic to the list of modules that need to be transformed
const additionalESModules = ['d3-scale-chromatic'];
module.exports = {
// Jest configuration provided by Grafana scaffolding
...require('./.config/jest.config'),
// Override transformIgnorePatterns to include d3-scale-chromatic
transformIgnorePatterns: [nodeModulesToTransform([...grafanaESModules, ...additionalESModules])],
// Add module name mapper to resolve react-router/dom
moduleNameMapper: {
...require('./.config/jest.config').moduleNameMapper,
'^react-router/dom$': 'react-router-dom',
},
};