17 lines
519 B
TypeScript
17 lines
519 B
TypeScript
import { it, expect } from "vitest";
|
|
import type { Component } from "vue";
|
|
declare module "#components" {
|
|
export const SomeComponent: Component;
|
|
}
|
|
// ---cut---
|
|
// tests/components/SomeComponents.nuxt.spec.ts
|
|
import { mountSuspended } from "@nuxt/test-utils/runtime";
|
|
import { SomeComponent } from "#components";
|
|
|
|
it("can mount some component", async () => {
|
|
const component = await mountSuspended(SomeComponent);
|
|
expect(component.text()).toMatchInlineSnapshot(
|
|
'"This is an auto-imported component"'
|
|
);
|
|
});
|