123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- module.exports = {
- preset: 'ts-jest/presets/js-with-babel',
- clearMocks: true,
- // The directory where Jest should output its coverage files
- coverageDirectory: 'coverage',
- // The test environment that will be used for testing
- testURL: 'http://localhost/',
- // Directory to search for tests
- roots: ['src/js/baglass/react/'],
- // The glob patterns Jest uses to detect test files
- testMatch: [
- '**/__tests__/**/*.test.[jt]s?(x)',
- ],
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
- testPathIgnorePatterns: [
- '/node_modules/'
- ],
- moduleNameMapper: {
- 'baglass/core-client/js/core-client/(.*)$': '<rootDir>/node_modules/@waca/core-client/js/core-client/$1',
- 'baglass/(.*)$': '<rootDir>/src/js/baglass/$1',
- 'mocks/(.*)$': '<rootDir>/src/js/baglass/react/testMocks/$1',
- 'ca-ui-toolkit-common': '@waca/ca-ui-toolkit/dist/js/uitoolkit/1.0/ca-ui-toolkit-common.js',
- 'ca-ui-toolkit-core': '@waca/ca-ui-toolkit/dist/js/uitoolkit/1.0/ca-ui-toolkit-core.js',
- '^polyglot': 'node-polyglot',
- '^webpackedGlass/(.*)$': '<rootDir>/src/js/baglass/react/$1',
- 'underscore': 'underscore/underscore.js'
- },
- setupFiles: [
- '<rootDir>/src/js/baglass/react/testMocks/ConfigureConsole.js'
- ],
- setupFilesAfterEnv: ['<rootDir>/src/js/baglass/react/testMocks/ModuleMocks.js'],
- snapshotSerializers: [
- 'enzyme-to-json/serializer'
- ]
- };
|