influxdb/ui/jest.config.js

38 lines
1.0 KiB
JavaScript
Raw Normal View History

module.exports = {
2019-10-17 20:58:17 +00:00
setupFilesAfterEnv: ['./jestSetup.ts'],
displayName: 'test',
testURL: 'http://localhost',
testPathIgnorePatterns: [
'<rootDir>/build',
'<rootDir>/node_modules/(?!(jest-test))',
2019-10-17 20:58:17 +00:00
'cypress',
],
2019-10-17 20:58:17 +00:00
setupFiles: ['<rootDir>/testSetup.ts'],
modulePaths: ['<rootDir>', '<rootDir>/node_modules'],
moduleDirectories: ['src'],
transform: {
2019-10-17 20:58:17 +00:00
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.(ts?|tsx?)$',
2019-10-17 20:58:17 +00:00
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
snapshotSerializers: ['enzyme-to-json/serializer'],
moduleNameMapper: {
2019-10-17 20:58:17 +00:00
'\\.(css|scss)$': 'identity-obj-proxy',
},
globals: {
'ts-jest': {
2019-10-17 20:58:17 +00:00
tsConfig: 'tsconfig.test.json',
diagnostics: {
ignoreCodes: [6133, 6192] // ignore unused variable errors
},
2019-10-17 20:58:17 +00:00
},
},
collectCoverageFrom: [
'./src/**/*.{js,jsx,ts,tsx}',
2019-10-17 20:58:17 +00:00
'!./src/**/*.test.{js,jsx,ts,tsx}',
],
coverageDirectory: './coverage',
2019-10-17 20:58:17 +00:00
coverageReporters: ['html', 'cobertura'],
reporters: ['default', 'jest-junit'],
}