fixes calendar bug #47
Annotations
3 errors and 1 warning
src/tests/integration/components/calendar.test.js > Calendar.vue > calls fetchSemesterData on mount:
src/components/Scheduling/Calendar.vue#L29
Error: [vitest] No "parseISOString" export is defined on the "../../../utils/calendarUtils" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("../../../utils/calendarUtils"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ Proxy.get parseISOString src/components/Scheduling/Calendar.vue:29:367
❯ Object.get node_modules/@vue/reactivity/dist/reactivity.cjs.js:1521:78
❯ Proxy._sfc_render src/components/Scheduling/Calendar.vue:28:20
❯ renderComponentRoot node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6385:16
❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5207:46
❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:226:19
❯ setupRenderEffect node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5342:5
|
src/tests/integration/components/calendar.test.js > Calendar.vue > passes the correct max-date to VDatePicker:
src/components/Scheduling/Calendar.vue#L29
Error: [vitest] No "parseISOString" export is defined on the "../../../utils/calendarUtils" mock. Did you forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
vi.mock(import("../../../utils/calendarUtils"), async (importOriginal) => {
const actual = await importOriginal()
return {
...actual,
// your mocked methods
}
})
❯ Proxy.get parseISOString src/components/Scheduling/Calendar.vue:29:367
❯ Object.get node_modules/@vue/reactivity/dist/reactivity.cjs.js:1521:78
❯ Proxy._sfc_render src/components/Scheduling/Calendar.vue:28:20
❯ renderComponentRoot node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6385:16
❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5207:46
❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:226:19
❯ setupRenderEffect node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5342:5
|
test
Process completed with exit code 1.
|
test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|