Skip to content

Commit 81a2476

Browse files
committed
docs(vitest-integration): clarify why we recommend the vitest integration
1 parent 70cc5d6 commit 81a2476

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/content/docs/workers/testing/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import { Render, LinkButton } from "~/components";
99

10-
The Workers platform has a variety of ways to test your applications, depending on your requirements. We recommend using the [Vitest integration](/workers/testing/vitest-integration), which allows for unit testing individual functions within your Worker. However, if you don't use Vitest, both [Miniflare's API](/workers/testing/miniflare/writing-tests) and the [`unstable_startWorker()`](/workers/wrangler/api/#unstable_startworker) API provide options for testing your Worker in any testing framework.
10+
The Workers platform has a variety of ways to test your applications, depending on your requirements. We recommend using the [Vitest integration](/workers/testing/vitest-integration), which allows for unit testing individual functions within [workerd](https://github.com/cloudflare/workerd). However, if you don't use Vitest, both [Miniflare's API](/workers/testing/miniflare/writing-tests) and the [`unstable_startWorker()`](/workers/wrangler/api/#unstable_startworker) API provide options for testing your Worker in any testing framework.
1111

1212
<LinkButton href="/workers/testing/vitest-integration/get-started/write-your-first-test/">
1313
Write your first test

src/content/docs/workers/testing/unit-testing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This test only verifies that the `add` function is returning the correct value,
3939

4040
## Vitest integration
4141

42-
The recommended way to unit test your Workers is by using the Workers Vitest integration. For more information on features, as well as installation and setup instructions, refer to the [Vitest integration Get Started guide](/workers/testing/vitest-integration/get-started/).
42+
Testing Workers within our Workers runtime can be challenging and requires additional manual setup. Our Workers Vitest integration simplifies this process for most projects. For more details on features and setup instructions, see the [Vitest integration Get Started guide](/workers/testing/vitest-integration/get-started/).
4343

4444
<Render file="testing-pages-functions" product="workers" />
4545

src/content/docs/workers/testing/vitest-integration/get-started/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: Install and set up the Workers Vitest integration.
1010

1111
import { DirectoryListing } from "~/components"
1212

13-
For most users, Cloudflare recommends using the Workers Vitest integration for testing Workers and [Pages Functions](/pages/functions/) projects. [Vitest](https://vitest.dev/) is a popular JavaScript testing framework featuring a very fast watch mode, Jest compatibility, and out-of-the-box support for TypeScript. In this integration, Cloudflare provides a custom pool that allows your Vitest tests to run *inside* the Workers runtime.
13+
Testing Workers and Pages Functions within our Workers runtime can be challenging and requires additional manual setup. To address this, Cloudflare offers the Workers Vitest integration, which streamlines the process by providing a custom pool that lets your tests run directly inside the Workers runtime using [Vitest](https://vitest.dev/). Vitest is a modern JavaScript testing framework with a wide range of features such as an instant watch mode, snapshot testing, code coverage, built-in TypeScript support and seamless Jest compatibility.
1414

1515
The Workers Vitest integration:
1616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar:
88

99
import { DirectoryListing, Render } from "~/components"
1010

11-
Information about the Workers Vitest integration - the recommended package for writing unit and integration tests for Workers.
11+
Information about the Workers Vitest integration:
1212

1313
<DirectoryListing />
1414

0 commit comments

Comments
 (0)