Skip to content

[wrangler] Allow test harness to reuse dry-run output - #15000

Merged
edmundhung merged 4 commits into
mainfrom
edmundhung/create-test-harness-outdir
Aug 11, 2026
Merged

[wrangler] Allow test harness to reuse dry-run output#15000
edmundhung merged 4 commits into
mainfrom
edmundhung/create-test-harness-outdir

Conversation

@edmundhung

Copy link
Copy Markdown
Member

Allow Wrangler projects to build a Worker once with wrangler deploy --dry-run --outdir and reuse that output with createTestHarness(). The harness retains the Wrangler configuration and selected environment while avoiding rebuilds during startup and reset.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: The public API TSDoc and changeset document the new option.

A picture of a cute animal (not mandatory, but encouraged)

Note

This is a contribution from an AI agent: Codex, GPT-5.

@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93f0fbb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@edmundhung
edmundhung force-pushed the edmundhung/create-test-harness-outdir branch from f14eb8f to efb2464 Compare August 3, 2026 17:19
@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15000

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15000

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15000

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15000

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15000

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15000

miniflare

npm i https://pkg.pr.new/miniflare@15000

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15000

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15000

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15000

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15000

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@15000

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15000

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15000

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15000

wrangler

npm i https://pkg.pr.new/wrangler@15000

commit: 93f0fbb

@edmundhung
edmundhung marked this pull request as ready for review August 4, 2026 10:06
@workers-devprod
workers-devprod requested review from a team and emily-shen and removed request for a team August 4, 2026 10:06
@workers-devprod

workers-devprod commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Aug 6, 2026

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me, but as I mentioned in my comment, I am really not a big fan of outDir as an input field 🥹

Comment thread .changeset/curly-beans-test.md
Comment thread packages/wrangler/src/api/test-harness.ts Outdated
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/wrangler/src/api/test-harness.ts Outdated
Comment thread packages/wrangler/src/api/test-harness.ts
devin-ai-integration[bot]

This comment was marked as resolved.

@edmundhung
edmundhung merged commit 731b33a into main Aug 11, 2026
72 of 73 checks passed
@edmundhung
edmundhung deleted the edmundhung/create-test-harness-outdir branch August 11, 2026 13:50
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants