Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Sep 26, 2023
1 parent f981ef5 commit b2cea4b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit b2cea4b

Please sign in to comment.