nodejs/node

FormData, Response, Request, and Headers have incorrect property descriptors

Open

#45,099 建立於 2022年10月20日

在 GitHub 查看
 (7 留言) (1 反應) (0 負責人)JavaScript (35,535 fork)batch import
confirmed-bughelp wanted

倉庫指標

Star
 (117,218 star)
PR 合併指標
 (平均合併 18天 17小時) (30 天內合併 219 個 PR)

描述

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

貢獻者指南