update jest-preset-angular configs

This commit is contained in:
Yann Braga 2022-02-21 18:34:08 +01:00
parent f7c9ce5b69
commit 89cee2b5ec
3 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -1,4 +1,4 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
import './globalMocks';
require('@storybook/babel-plugin-require-context-hook/register')();

View File

@ -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'],