From 952383792e40c1b86c12e35632f5fd4cc5261f33 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 24 Oct 2022 12:51:01 +0200 Subject: [PATCH] test for layouts/DashboardLayout.spec.js --- frontend/src/App.spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.spec.js b/frontend/src/App.spec.js index 77adc7084..b338481e6 100644 --- a/frontend/src/App.spec.js +++ b/frontend/src/App.spec.js @@ -1,5 +1,6 @@ import { mount, RouterLinkStub } from '@vue/test-utils' import App from './App' +import flushPromises from 'flush-promises' const localVue = global.localVue const mockStoreCommit = jest.fn() @@ -49,7 +50,8 @@ describe('App', () => { }) describe('route requires authorization', () => { - beforeEach(() => { + beforeEach(async () => { + await flushPromises() mocks.$route.meta.requiresAuth = true wrapper = Wrapper() })