2018-11-08 16:12:19 +02:00
|
|
|
const config = require('../../jest.config');
|
|
|
|
|
|
|
|
module.exports = {
|
2019-04-25 22:54:53 +02:00
|
|
|
preset: 'jest-preset-angular',
|
2018-11-08 16:12:19 +02:00
|
|
|
...config,
|
|
|
|
globals: {
|
2020-01-31 22:39:38 +01:00
|
|
|
'ts-jest': {
|
2020-05-15 08:19:07 +12:00
|
|
|
tsConfig: '<rootDir>/examples/angular-cli/src/tsconfig.spec.json',
|
|
|
|
stringifyContentPathRegex: '\\.html$',
|
2020-01-31 22:39:38 +01:00
|
|
|
},
|
2018-11-08 16:12:19 +02:00
|
|
|
},
|
|
|
|
roots: [__dirname],
|
|
|
|
transform: {
|
2019-10-18 09:07:36 +08:00
|
|
|
'^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName',
|
2018-12-16 12:12:26 +02:00
|
|
|
'^.+\\.jsx?$': '<rootDir>/scripts/babel-jest.js',
|
2018-11-08 16:12:19 +02:00
|
|
|
'^.+[/\\\\].storybook[/\\\\]config\\.ts$': '<rootDir>/scripts/jest-ts-babel.js',
|
2020-05-14 20:25:59 +12:00
|
|
|
'^.+\\.(ts|js|html)$': 'ts-jest',
|
2019-10-24 20:39:36 +08:00
|
|
|
'^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx',
|
2018-11-08 16:12:19 +02:00
|
|
|
},
|
2018-12-16 12:12:26 +02:00
|
|
|
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
|
2020-05-15 08:19:07 +12:00
|
|
|
snapshotSerializers: [
|
|
|
|
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
|
|
|
|
'jest-preset-angular/build/AngularSnapshotSerializer.js',
|
|
|
|
'jest-preset-angular/build/HTMLCommentSerializer.js',
|
|
|
|
],
|
2018-11-08 16:12:19 +02:00
|
|
|
};
|