You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const esModules = ['react-colorful', 'uuid', 'ol'].join('|');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
|
|
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js'],
|
|
|
|
|
|
|
|
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
|
|
|
|
|
|
|
|
moduleNameMapper: {
|
|
|
|
'grafana/app/(.*)': '<rootDir>/src/jest/grafanaMock.ts',
|
|
|
|
'jest/matchMedia': '<rootDir>/src/jest/matchMedia.ts',
|
|
|
|
'jest/outgoingWebhooksStub': '<rootDir>/src/jest/outgoingWebhooksStub.ts',
|
|
|
|
'^jest$': '<rootDir>/src/jest',
|
|
|
|
'^.+\\.(css|scss)$': '<rootDir>/src/jest/styleMock.ts',
|
|
|
|
'^lodash-es$': 'lodash',
|
|
|
|
'^.+\\.svg$': '<rootDir>/src/jest/svgTransform.ts',
|
|
|
|
'^.+\\.png$': '<rootDir>/src/jest/grafanaMock.ts',
|
|
|
|
},
|
|
|
|
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/.config/jest.setup.ts'],
|
|
|
|
|
|
|
|
testTimeout: 10000,
|
|
|
|
};
|