Skip to content

Commit 218a88b

Browse files
committed
Fix CodePreview.spec.js
1 parent ba2a67e commit 218a88b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/components/Tutorial/CodePreview.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ describe('CodePreview', () => {
9898
});
9999

100100
describe('in "medium" breakpoint', () => {
101-
it('renders the preview at 80% of 1/3 scale', () => {
101+
it('renders the preview at 80% of 1/3 scale', async () => {
102102
TopicStore.updateBreakpoint('medium');
103+
await wrapper.vm.$nextTick();
103104
const runtimePreview = wrapper.findComponent('.runtime-preview');
104105
expect(runtimePreview.attributes('style')).toBe('width: 160px;');
105106
});
@@ -295,8 +296,9 @@ describe('CodePreview', () => {
295296
});
296297

297298
describe('in "medium" breakpoint', () => {
298-
it('renders the preview at 80% of 1/1.75 scale', () => {
299+
it('renders the preview at 80% of 1/1.75 scale', async () => {
299300
TopicStore.updateBreakpoint('medium');
301+
await wrapper.vm.$nextTick();
300302
const runtimePreview = wrapper.findComponent('.runtime-preview');
301303
expect(runtimePreview.attributes('style')).toBe('width: 160px;');
302304
});

0 commit comments

Comments
 (0)