Skip to content

Commit

Permalink
docs: fix type checking of component testing blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 12, 2024
1 parent bd07021 commit b5e35e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/1.getting-started/11.testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit b5e35e3

Please sign in to comment.