Skip to content

Commit 65e6a66

Browse files
Clarify compatibility_date usage in configuration (#25954)
* Clarify compatibility_date usage in configuration Added note about compatibility_date usage in tests. * Update src/content/docs/workers/testing/vitest-integration/configuration.mdx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent d550b5b commit 65e6a66

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Options passed directly to `cloudflareTest()`.
123123

124124
- `miniflare`: `SourcelessWorkerOptions & { workers?: WorkerOptions\[]; }` optional
125125
- Use this to provide configuration information that is typically stored within the [Wrangler configuration file](/workers/wrangler/configuration/), such as [bindings](/workers/runtime-apis/bindings/), [compatibility dates](/workers/configuration/compatibility-dates/), and [compatibility flags](/workers/configuration/compatibility-flags/). The `WorkerOptions` interface is defined [here](https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare#interface-workeroptions). Use the `main` option above to configure the entry point, instead of the Miniflare `script`, `scriptPath`, or `modules` options.
126+
- If no `compatibility_date` is provided, then the test will use the latest locally available date.
126127

127128
- If your project makes use of multiple Workers, you can configure auxiliary Workers that run in the same `workerd` process as your tests and can be bound to. Auxiliary Workers are configured using the `workers` array, containing regular Miniflare [`WorkerOptions`](https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare#interface-workeroptions) objects. Note that unlike the `main` Worker, auxiliary Workers:
128129
- Cannot have TypeScript entrypoints. You must compile auxiliary Workers to JavaScript first. You can use the [`wrangler deploy --dry-run --outdir dist`](/workers/wrangler/commands/general/#deploy) command for this.

0 commit comments

Comments
 (0)