From c8d04a1604e87cfba581417788e00132cba93b4f Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 7 Jan 2021 14:26:10 +0100 Subject: [PATCH] mock cookie for testing --- webapp/store/auth.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapp/store/auth.test.js b/webapp/store/auth.test.js index 325fcc40d..0da91b461 100644 --- a/webapp/store/auth.test.js +++ b/webapp/store/auth.test.js @@ -1,5 +1,13 @@ import { getters, actions } from './auth.js' +jest.mock('universal-cookie', () => { + return jest.fn().mockImplementation(() => { + return { + get: (arg) => 'my-cookie-name', + } + }) +}) + let state let commit let dispatch