15 lines
439 B
TypeScript
15 lines
439 B
TypeScript
// @noErrors
|
|
import { it, expect } from "vitest";
|
|
// ---cut---
|
|
// tests/components/SomeComponents.nuxt.spec.ts
|
|
import { mountSuspended } from "@nuxt/test-utils/runtime";
|
|
import Index from "~/pages/index.vue";
|
|
|
|
// tests/App.nuxt.spec.ts
|
|
it("can also mount an app", async () => {
|
|
const component = await mountSuspended(Index, { route: "/test" });
|
|
expect(component.html()).toMatchInlineSnapshot(`
|
|
"<h1>Hello World</h1>"
|
|
`);
|
|
});
|