Repository navigation
test(wasm): the fetchWithAuth test runs through run_web_source_with_dom - #14869
Conversation
fetch_with_auth_passes_url_method_body_and_authorization (PerryTS#14718) calls run_web_source_around, a helper that existed only on that PR's branch; main has run_web_source_with_dom, whose DOM prelude runs before the runtime, so the fetch stub goes there after STUB_DOM. Without this the perry-codegen-wasm lib tests do not compile on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
cargo test -p perry-codegen-wasm --libdoes not compile onmain(5bad3ad):fetch_with_auth_passes_url_method_body_and_authorizationcame in with #14718 (mine). On that PR's branch it calledrun_web_source_around, a helper the branch also defined. The helper did not survive the squash merge alongside the other wasm test-helper changes, so main has the call without the definition.Main already has
run_web_source_with_dom(source, dom, after_boot), whosedomprelude runs before the runtime boots. That is exactly where the test'sglobalThis.fetchstub needs to go. This PR moves the stub there, appended afterSTUB_DOM. The test's source and expected output are unchanged. Tests only; no product change.Test plan
Paths touched
crates/perry-codegen-wasm/src/emit/tests.rs(test code only), plus the changelog fragment.🤖 Generated with Claude Code
https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Summary by CodeRabbit