Skip to content

Commit

Permalink
docs: update links to nuxt docs on testing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 19, 2023
1 parent c2b0973 commit 2e619a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime-utils/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type OptionalFunction<T> = T | (() => Awaitable<T>)
* test: "test-field"
* })
* ```
* @see https://github.com/danielroe/nuxt-vitest#registerendpoint
* @see https://nuxt.com/docs/getting-started/testing#registerendpoint
*/
export function registerEndpoint(
url: string,
Expand Down Expand Up @@ -77,14 +77,14 @@ export function registerEndpoint(
* }
* })
* ```
* @see https://github.com/danielroe/nuxt-vitest#mocknuxtimport
* @see https://nuxt.com/docs/getting-started/testing#mocknuxtimport
*/
export function mockNuxtImport<T = any>(
_name: string,
_factory: () => T | Promise<T>
): void {
throw new Error(
'mockNuxtImport() is a macro and it did not get transpiled, this may be an internal bug of nuxt-vitest.'
'mockNuxtImport() is a macro and it did not get transpiled. This may be an internal bug of @nuxt/test-utils.'
)
}

Expand Down Expand Up @@ -118,7 +118,7 @@ export function mockNuxtImport<T = any>(
* // or you can use SFC for redirecting to a mock component
* mockComponent('MyComponent', () => import('./MockComponent.vue'))
* ```
* @see https://github.com/danielroe/nuxt-vitest#mockcomponent
* @see https://nuxt.com/docs/getting-started/testing#mockcomponent
*/
export function mockComponent<Props, RawBindings = object>(
path: string,
Expand Down Expand Up @@ -218,6 +218,6 @@ export function mockComponent<
): void
export function mockComponent(_path: string, _component: any): void {
throw new Error(
'mockComponent() is a macro and it did not get transpiled, this may be an internal bug of nuxt-vitest.'
'mockComponent() is a macro and it did not get transpiled. This may be an internal bug of @nuxt/test-utils.'
)
}

0 comments on commit 2e619a8

Please sign in to comment.