test: restore /xhr to the WPT filter - #5723
Open
RaphaelFakhri wants to merge 1 commit into
Open
Conversation
/xhr was dropped from the test:wpt filter in nodejs#4786 without mention in the PR, which removed WPT FormData coverage: that suite lives under /xhr/formdata rather than /fetch. Restore the filter and record the xhr expectation entries for test files added to WPT since the removal. Also drop /serviceWorkers from the filter: the WPT directory is service-workers, so the argument has never matched any test.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5723 +/- ##
=======================================
Coverage 93.47% 93.47%
=======================================
Files 110 110
Lines 38908 38908
=======================================
Hits 36368 36368
Misses 2540 2540 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5710.
/xhrwas dropped from thetest:wptfilter in #4786, which is not mentioned in that PR's description and looks incidental. The practical effect is that undici lost WPTFormDatacoverage, because that suite lives under/xhr/formdatarather than under/fetch. Thexhrsubtree ofexpectation.jsonhas been frozen since, whilefetch,websockets,eventsourceandmimesniffall moved on.I ran the suite rather than assuming the stored data still held:
wpt-runner.mjs run /xhragainst the untouched committed expectations exits 0. 161 test files, 82 passing and 495 expected-fail subtests, matching the 583 storedxhrexpectations. The runner exits non-zero only when asuccessvalue drifts, and none did, so the frozen data is still accurate.npm run test:wptwith the amended filter exits 0: 1201 test files, 4869 passing and 4537 expected-fail subtests. Nothing outsidexhrmoved./xhragainst the finished branch leaves the working tree byte identical, so the refresh is stable rather than churning on every run.The expectations refresh is 83 lines, all inside the
xhrsubtree: four WPT test files added since the removal, recorded with their observed expected-fail cases, plus two deterministic case-order moves. I diffed the parsed JSON to confirm thatxhris the only top-level subtree that changed.This restores 82 passing subtests, roughly 60 of them
FormDataconformance: theformdata/suites plus theFormDatablock inxhr/idlharness./serviceWorkersis dropped from the same list. The WPT directory isservice-workersand the filter is a case-sensitivestartsWithon the pathname, so the argument has never matched anything. I confirmed it empirically:wpt-runner.mjs run /serviceWorkersreports 0 test files, andexpectation.jsonhas never had a key for it. Correcting the spelling instead would be the wrong move, since those tests are browser scoped and the runner's skip guard matchesserviceworkerwithout the hyphen, so removing the dead argument is a no-op.One tradeoff to be aware of: the
xhrsuite adds roughly two minutes to atest:wptinvocation. Until #5588 lands, that cost falls on every localnpm test, which is presumably why the removal went unnoticed. If you would rather have the coverage without the whole suite, the runner supports the narrower/xhr/formdata; I restored the full/xhrsince it is the exact revert of what was dropped and its expectations verifiably still hold.