Skip to content

Commit 81fd733

Browse files
chore: additional test coverage for service / environments tags + more (#10706)
* chore: add test for service/environment tags with redirected config * chore: fix regex in writeWranglerConfig() test helper * chore: use `config.definedEnvironments` for multi-env warning condition * fix: preserve original `topLevelName` when using a redirected config * chore: refactor service and environment tagging to consolidate with existing script-settings update requests * chore: add new `yieldRequestsFrom` test helper that mocks endpoints and lets you make assertions on requests The existing mechanisms for asserting on requests didn't offer enough control and I found that many assertions were not actually being properly verified. This powerful new generator-based approach allows you to make unique assertions against each request. And since the assertions are being made directly within the scope of the test case, they're much more reliable. * chore: refactor service/environment tag tests, fix false negatives * Update JSDoc example * suggested simplification of test helper * don't try to format generated prisma files --------- Co-authored-by: Peter Bacon Darwin <[email protected]>
1 parent 06e9a48 commit 81fd733

File tree

14 files changed

+536
-471
lines changed

14 files changed

+536
-471
lines changed

.changeset/evil-bags-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Fixed an issue that caused some Workers to have an incorrect service tag applied when using a redirected configuration file (as used by the Cloudflare Vite plugin). This resulted in these Workers not being correctly grouped with their sibling environments in the Cloudflare dashboard.

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ packages/chrome-devtools-patches/devtools-frontend
2828

2929
packages/vitest-pool-workers/scripts/rtti/rtti.js
3030

31+
packages/vite-plugin-cloudflare/playground/prisma/src/generated
32+
3133
# dist-functions are generated in the fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self folder
3234
dist-functions
3335

0 commit comments

Comments
 (0)