From 7059ddcd3022a3af74122a5f612eef2b6c51227a Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Wed, 11 Oct 2023 10:26:09 +0200 Subject: [PATCH] chore(new de view test): fix infinite recursion in console.warn stub --- src/pages/dataElements/New.spec.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/dataElements/New.spec.tsx b/src/pages/dataElements/New.spec.tsx index 9c44ad62..8dc9a909 100644 --- a/src/pages/dataElements/New.spec.tsx +++ b/src/pages/dataElements/New.spec.tsx @@ -53,9 +53,10 @@ async function changeSingleSelect( } describe('Data Elements / New', () => { + const consoleWarn = console.warn jest.spyOn(console, 'warn').mockImplementation((value) => { if (!value.match(/The query should be static/)) { - console.warn(value) + consoleWarn(value) } })