Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Migrate from Miniflare 2's test environments

A guide for migrating testing environments from Miniflare 2 to the Cloudflare Workers Vitest integration, including package installation, configuration updates for Vitest and TypeScript, and handling bindings and stor...

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Migrate from Miniflare 2's test environments

A guide for migrating testing environments from Miniflare 2 to the Cloudflare Workers Vitest integration, including package installation, configuration updates for Vitest and TypeScript, and handling bindings and stor...

When To Use

Use when migrating existing Cloudflare Workers test suites from Miniflare 2 or Jest to the @cloudflare/vitest-pool-workers integration.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-workflow-guide.mdA guide detailing the steps to migrate Workers test environments from Miniflare 2 to the Vitest integration, including configuration updates for Vitest and TypeScript.Questions about a guide detailing the steps to migrate Workers test environments from Miniflare 2 to the Vitest integration, includin...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir.textA list of npm commands to uninstall the Miniflare 2 environment and install Vitest with the Cloudflare Workers pool.Exact payloads, commands, or snippets shown in A list of npm commands to uninstall the Miniflare 2 environment and install Vitest with the Cloudflare Workers pool.
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-2.textA configuration example demonstrating how to migrate from Miniflare 2 to the Vitest pool workers environment using defineWorkersConfig and cloudflareTest.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to migrate from Miniflare 2 to the Vitest pool workers environment using de...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-3.textA configuration snippet showing the replacement of miniflare-2 types with @cloudflare/vitest-pool-workers in a Vitest setup.Exact payloads, commands, or snippets shown in A configuration snippet showing the replacement of miniflare-2 types with @cloudflare/vitest-pool-workers in a Vitest...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-4.textA code example demonstrating how to migrate test environment setups from Miniflare 2 to Vitest integration for Cloudflare Workers.Exact payloads, commands, or snippets shown in A code example demonstrating how to migrate test environment setups from Miniflare 2 to Vitest integration for Cloudf...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-5.textA code example demonstrating the transition from Miniflare 2 to Vitest integration using setupMiniflareIsolatedStorage.Exact payloads, commands, or snippets shown in A code example demonstrating the transition from Miniflare 2 to Vitest integration using setupMiniflareIsolatedStorage.
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-6.textA code example demonstrating how to use createExecutionContext and waitOnExecutionContext when migrating from Miniflare 2 to Vitest integration.Exact payloads, commands, or snippets shown in A code example demonstrating how to use createExecutionContext and waitOnExecutionContext when migrating from Minifla...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-7.textA code example demonstrating how to migrate Miniflare 2 test environment bindings and Durable Object storage access to the Vitest integration.Exact payloads, commands, or snippets shown in A code example demonstrating how to migrate Miniflare 2 test environment bindings and Durable Object storage access t...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-8.textA code example demonstrating how to migrate test environment code from Miniflare 2 to Vitest integration using cloudflare:workers imports.Exact payloads, commands, or snippets shown in A code example demonstrating how to migrate test environment code from Miniflare 2 to Vitest integration using cloudf...
examples/workers-testing-vitest-integration-migrate-from-miniflare-2-s-test-envir-9.textA code example demonstrating the migration from Miniflare 2's getMiniflareDurableObjectIds to the new cloudflare:workers env-based durable object listing.Exact payloads, commands, or snippets shown in A code example demonstrating the migration from Miniflare 2's getMiniflareDurableObjectIds to the new cloudflare:work...

What This Skill Covers

  • Migrate from Miniflare 2's test environments
  • Main sections: Install the Workers Vitest integration, Update your Vitest configuration file, Update your TypeScript configuration file, Access bindings, Storage isolation.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/testing/vitest-integration/migration-guides/migrate-from-miniflare-2