Repository navigation
[test-harness] Port the createTestHarness() example to Build Output - #16884
edmundhung wants to merge 2 commits into
Conversation
|
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/test-harness
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
42a9282 to
5bcc49e
Compare
5bcc49e to
81cf8b7
Compare
81cf8b7 to
ff1a0be
Compare
419e5d6 to
d6e9301
Compare
5059ace to
84a6086
Compare
ce0dea4 to
1c6a4c3
Compare
1c6a4c3 to
fbc45d5
Compare
fbc45d5 to
3200038
Compare
fe8f890 to
10f8508
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers |
There was a problem hiding this comment.
Superseded by the review of
86ee280c.
This review, of 10f8508c
✅ Approved — No issues found. The fixture port to @cloudflare/test-harness and cf projects built by the Vite plugin is consistent, and the tests were updated to match.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input, and no auth or access-control changes.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions. For example, the tests take expect from the test context.
📋 Code Quality: ✅ LGTM
I found no defects. The harness calls (projectDir, envOverrides with bindings.worker(...), typed getWorker<typeof import(...)> and applyD1Migrations) match the @cloudflare/test-harness API. The D1 migrations directory is still in the api project. The Turbo outputs line up with the .cloudflare/output build location, and the lockfile matches the package.json changes.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout.
Reviewed commit: 10f8508c
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
There was a problem hiding this comment.
Superseded by the review of
4f718c27.
This review, of 86ee280c
✅ Approved — No issues found. The only change since the previously approved commit is a reworded test comment, and it now describes the code correctly.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input, and no auth changes.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions.
📋 Code Quality: ✅ LGTM
The reworded comment in tests/playwright.test.ts matches the projectDir config below it. I found no leftover references to ApiEnv, WebEnv, dist/ or the Wrangler configs.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout.
Reviewed commit: 86ee280c
86ee280 to
4f718c2
Compare
There was a problem hiding this comment.
Superseded by the review of
28e1aec3.
This review, of 4f718c27
✅ Approved — No issues found. The only change since the last approved commit is the reworded Playwright test comment, which now describes the projectDir config correctly.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input and no auth changes.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions.
📋 Code Quality: ✅ LGTM
I found no issues.
The only change since the last review is a reworded comment in tests/playwright.test.ts. It now says the test runs the Build Output in each project directory, which matches the projectDir config below it. This settles @dario-piotrowicz's earlier nit.
The fixture has no leftover references to ApiEnv, WebEnv, dist/ or the removed Wrangler configs.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout.
Reviewed commit: 4f718c27
4f718c2 to
28e1aec
Compare
There was a problem hiding this comment.
Superseded by the review of
2e3a8145.
This review, of 28e1aec3
✅ Approved — No issues found. The fixture now builds each Worker as a cf project with the Vite plugin, and nothing changed since the last approved review.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input and no auth changes.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions.
📋 Code Quality: ✅ LGTM
The fixture is ported cleanly to the cf project layout:
- Each Worker has a
cloudflare.config.tsand avite.config.ts. package.jsonbuilds each project withvite build.- The
turbo.jsonoutputs point at each project's.cloudflare/output. - The Wrangler configs and generated types are removed.
- The lockfile entries match the
package.jsonchanges.
The test comment @dario-piotrowicz asked about was reworded earlier and is still accurate.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout.
Reviewed commit: 28e1aec3
28e1aec to
2e3a814
Compare
There was a problem hiding this comment.
Superseded by the review of
3320c866.
This review, of 2e3a8145
✅ Approved — No issues found. The fixture now builds each Worker as a cf project with the Vite plugin, and nothing changed since the last approved review.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input and no auth changes.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions.
📋 Code Quality: ✅ LGTM
The fixture is ported cleanly to the cf project layout:
- Each Worker has a
cloudflare.config.tsand avite.config.ts. package.jsonbuilds each project withvite build.- The
turbo.jsonoutputs point at each project's.cloudflare/output. - The Wrangler configs and generated types are removed.
- The lockfile entries match the
package.jsonchanges.
The test comment @dario-piotrowicz asked about was reworded earlier and is still accurate.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout.
Reviewed commit: 2e3a8145 — same changes as 28e1aec3, so this is that commit's review (no new review was run; line numbers are as of 28e1aec3)
fixtures/create-test-harness-example now tests its Workers' production build with @cloudflare/test-harness, from Vitest and Playwright. Each Worker is a cf project built by the Vite plugin, so the Wrangler configs, generated types and dry-run builds are gone. The Cloudflare docs link to this fixture as the complete example, so this merges together with the docs change for @cloudflare/test-harness.
2e3a814 to
3320c86
Compare
There was a problem hiding this comment.
✅ Approved — No findings. The only change since the last approved review is a one-line README link to the fixture.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
This pull request only changes a test fixture. It adds no secrets, no handling of untrusted input and no auth changes. The KV and D1 IDs are placeholders carried over from the old Wrangler configs.
📖 AGENTS.md: ✅ LGTM
The change follows the repository conventions.
📋 Code Quality: ✅ LGTM
The only change since the last review is a link to the fixture in packages/test-harness/README.md.
The fixture has no references left from before the port: no WebEnv, ApiEnv, dist/ paths or Wrangler configs. The Worker types now come from each cloudflare.config.ts. The test comment @dario-piotrowicz asked about was reworded earlier and is still accurate.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The README updates match the new project layout. The new link in packages/test-harness/README.md points to the fixture.
Reviewed commit: 3320c866
Part of DEVX-2726 (RM-31812). Stacked on #16798.
Ports
fixtures/create-test-harness-exampleto@cloudflare/test-harness. Each Worker becomes a cf project built by the Vite plugin, and Vitest and Playwright both test that Build Output:Important
The Cloudflare docs link to this fixture as the complete
createTestHarness()example, so merge this together with the docs change in DEVX-2728.