Skip to content

Commit 0c40a65

Browse files
handles tests upadtes
1 parent f7968af commit 0c40a65

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/views/__tests__/TutorPage.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import { describe, it, expect } from 'vitest';
1+
import { describe, it, expect, beforeEach } from 'vitest';
22
import { shallowMount } from '@vue/test-utils';
33
import TutorPage from '../TutorPage.vue';
4+
import { createPinia, setActivePinia } from 'pinia';
45

56
describe('TutorPage', () => {
7+
beforeEach(() => {
8+
setActivePinia(createPinia());
9+
});
610
it('renders properly', () => {
711
const wrapper = shallowMount(TutorPage);
812
expect(wrapper.element).toMatchSnapshot();

src/views/__tests__/__snapshots__/TutorPage.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ exports[`TutorPage > renders properly 1`] = `
2020
data-v-8a8621cb=""
2121
>
2222
<first-step-stub
23+
addfile="[Function]"
2324
data-test="fist-step"
2425
data-v-8a8621cb=""
2526
disabled="false"
@@ -34,6 +35,7 @@ exports[`TutorPage > renders properly 1`] = `
3435
<third-step-stub
3536
data-test="third-step"
3637
data-v-8a8621cb=""
38+
syllabus=""
3739
visible="false"
3840
/>
3941
</div>

0 commit comments

Comments
 (0)