Skip to content

Commit 78b73a6

Browse files
committed
Fix App.spec.js
1 parent 218a88b commit 78b73a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unit/App.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ describe('App', () => {
317317
await flushPromises();
318318
expect(setPropertySpy).toHaveBeenCalledWith('--text', LightDarkModeCSSSettings.text.light);
319319
matchMedia.addListener.mock.calls[0][0].call(wrapper.vm, { matches: true });
320+
await wrapper.vm.$nextTick();
320321
expect(setPropertySpy).toHaveBeenCalledTimes(2);
321322
expect(setPropertySpy).toHaveBeenCalledWith('--text', LightDarkModeCSSSettings.text.dark);
322323
});
@@ -334,6 +335,7 @@ describe('App', () => {
334335
expect(setPropertySpy).toHaveBeenCalledTimes(1);
335336
expect(setPropertySpy).toHaveBeenCalledWith('--text', 'light');
336337
matchMedia.addListener.mock.calls[0][0].call(wrapper.vm, { matches: true });
338+
await wrapper.vm.$nextTick();
337339
expect(removePropertySpy).toHaveBeenCalledTimes(2);
338340
expect(removePropertySpy).toHaveBeenLastCalledWith('--text');
339341
expect(setPropertySpy).toHaveBeenCalledWith('--text', 'dark');

0 commit comments

Comments
 (0)