Skip to content

Commit c12c0fe

Browse files
authored
improve(wrangler): fix subdomain tests (#7210)
Many tests had mocks that weren't called, or had false assertions about not updating subdomain routes when they actually were being updated. Additionally, available_on_subdomain is now unecessary during script-upload, as it is not read there, due to being handled entirely within triggers-deploy. This also saves a double call to get /subdomain in the new-api path. The get/update subdomain helpers are refactored from deploy/version tests, and unified to standardize default workername and legacyEnv. I wanted to remove the getSubdomain mock from mockUpload entirely, but there were a bit too many callsites... At least every test now that makes assertions about workers.dev deployments does explicitly reset the mock return value.
1 parent 4814455 commit c12c0fe

File tree

7 files changed

+199
-150
lines changed

7 files changed

+199
-150
lines changed

.changeset/clean-tigers-breathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Avoid an unnecessary GET request during `wrangler deploy`.

0 commit comments

Comments
 (0)