Skip to content

Commit 4f4c6e3

Browse files
fix mountSuspended in tests
1 parent 6b6adce commit 4f4c6e3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/components/Launcher.nuxt.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// @vitest-environment nuxt
22

33
import { describe, expect, test, vi } from "vitest"
4-
import { flushPromises, mount } from "@vue/test-utils"
4+
import { flushPromises } from "@vue/test-utils"
5+
import { mountSuspended } from "@nuxt/test-utils/runtime"
56

67
import { createVuetify } from "vuetify"
78
import * as components from "vuetify/components"
@@ -21,7 +22,7 @@ global.ResizeObserver = require("resize-observer-polyfill")
2122
describe("Launcher.vue", async () => {
2223
test(`Mount`, async () => {
2324
const spy_cloud_store = vi.spyOn(cloud_store, "create_connexion")
24-
const wrapper = mount(Launcher, {
25+
const wrapper = await mountSuspended(Launcher, {
2526
global: {
2627
plugins: [vuetify],
2728
},

test/components/Wrapper.nuxt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @vitest-environment nuxt
22

33
import { describe, expect, test } from "vitest"
4-
import { mount } from "@vue/test-utils"
4+
import { mountSuspended } from "@nuxt/test-utils/runtime"
55

66
import { createVuetify } from "vuetify"
77
import * as components from "vuetify/components"
@@ -46,7 +46,7 @@ describe("Step.vue", async () => {
4646
},
4747
],
4848
})
49-
const wrapper = mount(Wrapper, {
49+
const wrapper = await mountSuspended(Wrapper, {
5050
global: {
5151
plugins: [vuetify],
5252
provide: { stepper_tree },

0 commit comments

Comments
 (0)