From 0137b9081320c12609f73a9db74101e8d83c3e83 Mon Sep 17 00:00:00 2001 From: Yurii Sorokin Date: Thu, 22 Feb 2018 09:59:52 +0200 Subject: [PATCH] Move serializers setup to jest config to be possible to override them --- jest-preset.json | 4 ++++ setupJest.js | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jest-preset.json b/jest-preset.json index 0e5cda88cc..f71d68006d 100644 --- a/jest-preset.json +++ b/jest-preset.json @@ -24,5 +24,9 @@ }, "transformIgnorePatterns": [ "node_modules/(?!@ngrx)" + ], + "snapshotSerializers": [ + "/node_modules/jest-preset-angular/AngularSnapshotSerializer.js", + "/node_modules/jest-preset-angular/HTMLCommentSerializer.js" ] } diff --git a/setupJest.js b/setupJest.js index df056fba11..8169670a96 100644 --- a/setupJest.js +++ b/setupJest.js @@ -18,6 +18,3 @@ getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting() ); - -expect.addSnapshotSerializer(HTMLCommentSerializer); -expect.addSnapshotSerializer(AngularSnapshotSerializer);