From b2cea4bbddceca6e1e3912a8859b4ffb55d739f1 Mon Sep 17 00:00:00 2001 From: Seth Silesky <5115498+silesky@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:11:50 -0500 Subject: [PATCH] wip --- .../browser/__tests__/integrations.integration.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/browser/src/browser/__tests__/integrations.integration.test.ts b/packages/browser/src/browser/__tests__/integrations.integration.test.ts index e98dbe016..c49fb4356 100644 --- a/packages/browser/src/browser/__tests__/integrations.integration.test.ts +++ b/packages/browser/src/browser/__tests__/integrations.integration.test.ts @@ -19,13 +19,14 @@ const mockFetchCdnSettings = (cdnSettings: any = {}) => { .mockImplementation(createMockFetchImplementation(cdnSettings)) } -const ogConsoleWarn = console.warn -jest.spyOn(console, 'warn').mockImplementation((msg) => { - if (msg.includes('deprecate')) { +jest.spyOn(console, 'warn').mockImplementation((...errMsgs) => { + if (errMsgs[0].includes('deprecate')) { // get rid of deprecation wawrning spam return } - ogConsoleWarn(msg) + throw new Error( + 'Unexpected console.warn spam in your jest test' + JSON.stringify(errMsgs) + ) }) describe('Integrations', () => {