Skip to content

Commit 97470f9

Browse files
committed
update wording
1 parent ff06766 commit 97470f9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/content/docs/workers/testing/vitest-integration/configuration.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Custom Vitest `environment`s or `runner`s are not supported when using the Worke
5050

5151
The following APIs are exported from the `@cloudflare/vitest-pool-workers/config` module.
5252

53-
### `defineWorkersConfig(options)`
53+
### defineWorkersConfig(options)
5454

55-
Ensures Vitest is configured to use the Workers integration with the correct module resolution settings, and provides type checking for [WorkersPoolOptions](#workerspooloptions). This should be used in place of the [`defineConfig()`](https://vitest.dev/config/file.html) function from Vitest. The `defineWorkersConfig()` function also accepts a `Promise` of `options`, or an optionally-`async` function returning `options`.
55+
Ensures Vitest is configured to use the Workers integration with the correct module resolution settings, and provides type checking for [WorkersPoolOptions](#workerspooloptions). This should be used in place of the [`defineConfig()`](https://vitest.dev/config/file.html) function from Vitest. It also accepts a `Promise` of `options`, or an optionally-`async` function returning `options`.
5656

5757
```ts
5858
import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config";
@@ -68,9 +68,9 @@ export default defineWorkersConfig({
6868
});
6969
```
7070

71-
### `defineWorkersProject(options)`
71+
### defineWorkersProject(options)
7272

73-
Ensures Vitest is configured to use the Workers integration with the correct module resolution settings, and provides type checking for [WorkersPoolOptions](#workerspooloptions) similar to `defineWorkersConfig`, except this should be used in place of the [`defineProject()`](https://vitest.dev/guide/workspace) function from Vitest. The `defineWorkersProject()` function also accepts a `Promise` of `options`, or an optionally-`async` function returning `options`.
73+
Similar to [`defineWorkersConfig()`](#defineworkersconfigoptions), this ensures Vitest is configured to use the Workers integration with the correct module resolution settings, and provides type checking for [WorkersPoolOptions](#workerspooloptions), except it should be used in place of the [`defineProject()`](https://vitest.dev/guide/workspace) function from Vitest. It also accepts a `Promise` of `options`, or an optionally-`async` function returning `options`.
7474

7575
```ts
7676
import { defineWorkspace, defineProject } from "vitest/config";
@@ -95,9 +95,9 @@ const workspace = defineWorkspace([
9595
export default workspace;
9696
```
9797

98-
### `buildPagesASSETSBinding(assetsPath)`
98+
### buildPagesASSETSBinding(assetsPath)
9999

100-
Creates a Pages ASSETS binding that serves files insides the `assetsPath`. This is required if you uses `createPagesEventContext()` to test your Pages Functions. Refer to the [Pages recipe](/workers/testing/vitest-integration/recipes) for a full example.
100+
Creates a Pages ASSETS binding that serves files insides the `assetsPath`. This is required if you uses `createPagesEventContext()` or `SELF` to test your **Pages Functions**. Refer to the [Pages recipe](/workers/testing/vitest-integration/recipes) for a full example.
101101

102102
```ts
103103
import path from "node:path";
@@ -126,7 +126,7 @@ export default defineWorkersProject(async () => {
126126

127127
```
128128

129-
### `readD1Migrations(migrationsPath)`
129+
### readD1Migrations(migrationsPath)
130130

131131
Reads all [D1 migrations](/d1/reference/migrations/) stored at `migrationsPath` and returns them ordered by migration number. Each migration will have its contents split into an array of individual SQL queries. Call the [`applyD1Migrations()`](/workers/testing/vitest-integration/test-apis/#d1) function inside a test or [setup file](https://vitest.dev/config/#setupfiles) to apply migrations. Refer to the [D1 recipe](https://github.com/cloudflare/workers-sdk/tree/main/fixtures/vitest-pool-workers-examples/d1) for an example project using migrations.
132132

0 commit comments

Comments
 (0)