From 71986620b04b7aea81529544a47982b0a4337bec Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 16 May 2022 12:44:24 +0200 Subject: [PATCH] supress unnecessary angular console logs from tests --- app/angular/src/builders/build-storybook/index.spec.ts | 2 +- .../src/client/preview/angular-beta/RendererFactory.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/angular/src/builders/build-storybook/index.spec.ts b/app/angular/src/builders/build-storybook/index.spec.ts index c396c9cc6d9..40b12a8b880 100644 --- a/app/angular/src/builders/build-storybook/index.spec.ts +++ b/app/angular/src/builders/build-storybook/index.spec.ts @@ -142,7 +142,7 @@ describe('Build Storybook Builder', () => { }); it('should throw error', async () => { - buildStandaloneMock.mockRejectedValue(new Error()); + buildStandaloneMock.mockRejectedValue(true); const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { browserTarget: 'angular-cli:build-2', diff --git a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts b/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts index d9976268d77..3d57c6c9ef2 100644 --- a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts +++ b/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts @@ -22,6 +22,7 @@ describe('RendererFactory', () => { rootTargetDOMNode = global.document.getElementById('root'); rootDocstargetDOMNode = global.document.getElementById('root-docs'); (platformBrowserDynamic as any).mockImplementation(platformBrowserDynamicTesting); + jest.spyOn(console, 'log').mockImplementation(() => {}); }); afterEach(() => {