mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +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
|
||||
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'
|
||||
@ -207,6 +211,10 @@ Examples:
|
||||
|
||||
```ts twoslash
|
||||
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 { renderSuspended } from '@nuxt/test-utils/runtime'
|
||||
|
Loading…
Reference in New Issue
Block a user