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: {
|
|
|
|
__TRANSFORM_HTML__: true,
|
2020-01-31 22:39:38 +01:00
|
|
|
'ts-jest': {
|
|
|
|
tsConfigFile: '<rootDir>/examples/angular-cli/src/tsconfig.spec.json',
|
|
|
|
},
|
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',
|
2020-05-09 11:34:50 +02:00
|
|
|
'^.+\\.jsx?$': '<rootDir>/scripts/utils/jest-transform-js.js',
|
|
|
|
'^.+[/\\\\].storybook[/\\\\]config\\.ts$': '<rootDir>/scripts/utils/jest-transform-ts.js',
|
2019-04-25 22:54:53 +02:00
|
|
|
'^.+\\.html$': '<rootDir>/node_modules/jest-preset-angular/preprocessor.js',
|
|
|
|
'^.+\\.ts$': '<rootDir>/node_modules/jest-preset-angular/preprocessor.js',
|
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'],
|
2018-11-08 16:12:19 +02:00
|
|
|
};
|