blob: f72ad248584c10b62f0596c0bd3ccda3d9c11988 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001module.exports = {
2 collectCoverageFrom: ['src/**/*.{js,jsx}'],
3 coveragePathIgnorePatterns: [
4 '<rootDir>/node_modules/',
5 '<rootDir>/src/core/server/webpack-isomorphic-tools-config.js',
6 '<rootDir>/src/locale/',
7 ],
8 "reporters": [ "default", "jest-junit" ],
9 moduleDirectories: [
10 'src',
11 'node_modules',
12 ],
13 moduleFileExtensions: [
14 'js',
15 'json',
16 'jsx',
17 ],
18 moduleNameMapper: {
19 // Prevent un-transpiled react-photoswipe code being required.
20 '^photoswipe$': '<rootDir>/node_modules/photoswipe',
21 // Use the client-side logger by default for tests.
22 '^core/logger$': '<rootDir>/src/core/client/logger',
23 // Alias tests for tests to be able to import helpers.
24 '^tests/(.*)$': '<rootDir>/tests/$1',
25 // Replaces the following formats with an empty module.
26 '^.+\\.(scss|css|svg|woff|woff2|mp4|webm)$': '<rootDir>/tests/emptyModule',
27 },
28 setupFilesAfterEnv: ["<rootDir>/src/setupJest.ts"],
29 testPathIgnorePatterns: [
30 '<rootDir>/node_modules/',
31 '<rootDir>/(assets|bin|config|coverage|dist|docs|flow|locale|src)/',
32 ],
33 testMatch: [
34 '**/[Tt]est(*).js?(x)',
35 '**/__tests__/**/*.js?(x)',
36 ],
37 transform: {
38 "^.+\\.(ts|html)$": "<rootDir>/node_modules/jest-preset-angular/preprocessor.js",
39 "^.+\\.js$": "babel-jest"
40 },
41 transformIgnorePatterns: [
42 '<rootDir>/node_modules/',
43 ],
44 verbose: false,
45};