mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
update jest-preset-angular configs
This commit is contained in:
parent
f7c9ce5b69
commit
89cee2b5ec
@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import 'jest-preset-angular';
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
|
||||
global.EventSource = class {} as any;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import 'jest-preset-angular';
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
import './globalMocks';
|
||||
|
||||
require('@storybook/babel-plugin-require-context-hook/register')();
|
||||
|
@ -7,7 +7,7 @@ module.exports = {
|
||||
preset: 'jest-preset-angular',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfig: path.join(__dirname, 'src/tsconfig.spec.json'),
|
||||
tsconfig: path.join(__dirname, 'src/tsconfig.spec.json'),
|
||||
stringifyContentPathRegex: '\\.html$',
|
||||
astTransformers: {
|
||||
before: [
|
||||
@ -26,9 +26,9 @@ module.exports = {
|
||||
},
|
||||
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
|
||||
'jest-preset-angular/build/AngularSnapshotSerializer.js',
|
||||
'jest-preset-angular/build/HTMLCommentSerializer.js',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
],
|
||||
setupFilesAfterEnv: ['./jest-config/setup.ts'],
|
||||
testPathIgnorePatterns: ['app.component.spec.ts'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user