Open
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
Description
Version
v18.11.0
Platform
Microsoft Windows NT 10.0.19043.0 x64
Subsystem
No response
What steps will reproduce the bug?
The property descriptors should match such that this test succeeds:
for (const global of [
'Headers',
'Request',
'Response',
'FormData'
]) {
const desc = Object.getOwnPropertyDescriptor(globalThis, global)
assert.notStrictEqual(desc, undefined)
assert.deepStrictEqual(desc.value, globalThis[global])
assert.ok(desc.writable)
assert.ok(!desc.enumerable)
assert.ok(desc.configurable)
}How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
the tests from above pass
What do you see instead?
the descriptors are inconsistent with other environments
Additional information
No response
Reacted by Benjamin Gruenbaum
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
Activity
[-]FormData, Response, Request, and Headers[/-][+]FormData, Response, Request, and Headers have incorrect property descriptors[/+]bnoordhuis commentedon Oct 20, 2022
If you submit that to WPT, then node will fix that next time we update.
If WPT already contains tests but we're not testing that particular submodule, then please see test/wpt/README.md for how to enable them.
KhafraDev commentedon Oct 20, 2022
The tests exist https://github.com/web-platform-tests/wpt/blob/master/fetch/api/idlharness.any.js
I will look into enabling these tests in node but I've never worked with node's WPT runner and idlharness tests are a little more involved than other tests. π
targos commentedon Oct 22, 2022
I think we already run idlharness tests for other features (for example URL) without issues.
KhafraDev commentedon Oct 22, 2022
Cool, I'll look into it once a new version of undici is released and is updated in node. Otherwise a few tests will fail that don't anymore.
aduh95 commentedon Oct 24, 2022
We should probably make sure that Undici is snapshotted, so we can get rid of the lazy-loading without perf implications.
techsavvyash commentedon Feb 4, 2023
Hey Team.
I am a newbie dev starting out in OSS, I would like to take this issue up, can anyone help me navigate through and fix this.
Thanks
KhafraDev commentedon Feb 4, 2023
I don't think this issue is actionable. Other globals (Blob and File, if File is ever made a global...) were made getters as well in #45659.
LeonxLJX commentedon Sep 1, 2026
thanmai670 commentedon Oct 31, 2026
I've submitted a PR to address this issue: #67168
The global property descriptors for
FormData,Headers,Request, andResponsenow correctly match the Web IDL spec (data properties withwritable: true,enumerable: false,configurable: true). The PR adds tests to guard this behavior going forward.