mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
docs: fix type checking of component testing blocks
This commit is contained in:
parent
bd07021405
commit
b5e35e3bd7
@ -161,6 +161,10 @@ export default defineVitestConfig({
|
|||||||
|
|
||||||
```ts twoslash
|
```ts twoslash
|
||||||
import { it, expect } from 'vitest'
|
import { it, expect } from 'vitest'
|
||||||
|
import type { Component } from 'vue'
|
||||||
|
declare module '#components' {
|
||||||
|
export const SomeComponent: Component
|
||||||
|
}
|
||||||
// ---cut---
|
// ---cut---
|
||||||
// tests/components/SomeComponents.nuxt.spec.ts
|
// tests/components/SomeComponents.nuxt.spec.ts
|
||||||
import { mountSuspended } from '@nuxt/test-utils/runtime'
|
import { mountSuspended } from '@nuxt/test-utils/runtime'
|
||||||
@ -207,6 +211,10 @@ Examples:
|
|||||||
|
|
||||||
```ts twoslash
|
```ts twoslash
|
||||||
import { it, expect } from 'vitest'
|
import { it, expect } from 'vitest'
|
||||||
|
import type { Component } from 'vue'
|
||||||
|
declare module '#components' {
|
||||||
|
export const SomeComponent: Component
|
||||||
|
}
|
||||||
// ---cut---
|
// ---cut---
|
||||||
// tests/components/SomeComponents.nuxt.spec.ts
|
// tests/components/SomeComponents.nuxt.spec.ts
|
||||||
import { renderSuspended } from '@nuxt/test-utils/runtime'
|
import { renderSuspended } from '@nuxt/test-utils/runtime'
|
||||||
|
Loading…
Reference in New Issue
Block a user