react-calendar-heatmap's output depends on the timezone, which means that snapshots can fail if the timezone changes. This sets the timezone as UTC during client tests to avoid that problem.
22 lines
775 B
JavaScript
22 lines
775 B
JavaScript
module.exports = {
|
|
moduleNameMapper: {
|
|
'\\.(jpg|jpeg|png|svg|woff|woff2)$': '<rootDir>/src/__mocks__/fileMock.js',
|
|
// Plain CSS - match css files that don't end with
|
|
// '.module.css' https://regex101.com/r/VzwrKH/4
|
|
'^(?!.*\\.module\\.css$).*\\.css$': '<rootDir>/src/__mocks__/styleMock.js',
|
|
// CSS Modules - match files that end with 'module.css'
|
|
'\\.module\\.css$': 'identity-obj-proxy',
|
|
analytics: '<rootDir>/src/__mocks__/analyticsMock.js'
|
|
},
|
|
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/.cache/'],
|
|
globals: {
|
|
__PATH_PREFIX__: ''
|
|
},
|
|
globalSetup: './jest-timezone-setup.js',
|
|
verbose: true,
|
|
transform: {
|
|
'^.+\\.js$': '<rootDir>/jest.transform.js'
|
|
},
|
|
transformIgnorePatterns: ['node_modules/(?!(gatsby)/)']
|
|
};
|