Skip to content

Commit

Permalink
docs: recommend to install non-edge version of @nuxt/test-utils (nu…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 6, 2022
1 parent d0c0cd7 commit 3066e49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/content/1.docs/1.getting-started/11.testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Test utils are still in development and the API and behavior may change. Current
If you are a module author, you can find more specific informations in the [Module Author's guide](/docs/guide/going-further/modules#testing)
::

In Nuxt 3, we have a rewritten version of `@nuxt/test-utils` available as `@nuxt/test-utils-edge`. We support [Vitest](https://github.com/vitest-dev/vitest) and [Jest](https://jestjs.io/) as the test runner.
In Nuxt 3, we have a rewritten version of `@nuxt/test-utils`. We support [Vitest](https://github.com/vitest-dev/vitest) and [Jest](https://jestjs.io/) as test runners.

## Installation

```bash
yarn add --dev @nuxt/test-utils-edge vitest
yarn add --dev @nuxt/test-utils vitest
```

## Setup
Expand All @@ -25,7 +25,7 @@ In each `describe` block where you are taking advantage of the `@nuxt/test-utils

```ts
import { describe, test } from 'vitest'
import { setup, $fetch } from '@nuxt/test-utils-edge'
import { setup, $fetch } from '@nuxt/test-utils'

describe('My test', async () => {
await setup({
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.docs/2.guide/3.going-further/3.modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ We can create a test file and use the `rootDir` to test the fixture.
// basic.test.js
import { describe, it, expect } from 'vitest'
import { fileURLToPath } from 'node:url'
import { setup, $fetch } from '@nuxt/test-utils-edge'
import { setup, $fetch } from '@nuxt/test-utils'

describe('ssr', async () => {
await setup({
Expand Down

0 comments on commit 3066e49

Please sign in to comment.