Skip to content

Commit da68ac7

Browse files
Clarify compatibility_date usage in configuration
Added note about compatibility_date usage in tests.
1 parent 13b163f commit da68ac7

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
@@ -237,6 +237,7 @@ export default defineWorkersProject(async () => {
237237
- `miniflare`: `SourcelessWorkerOptions & { workers?: WorkerOptions\[]; }` optional
238238

239239
- 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.
240+
- if no `compatibility_date` is provided then the test will use the latest locally available date.
240241

241242
- 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:
242243
- 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/#deploy) command for this.

0 commit comments

Comments
 (0)