Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/web/fetch/formdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const nodeUtil = require('node:util')
class FormData {
#state = []

constructor (form) {
constructor (form = undefined) {
webidl.util.markAsUncloneable(this)

if (form !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion test/fetch/formdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ test('FormData should be compatible with third-party libraries', (t) => {
})

test('arguments', () => {
assert.strictEqual(FormData.constructor.length, 1)
assert.strictEqual(FormData.prototype.constructor.length, 0)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Node.js v24.5.0.
Type ".help" for more information.
> `${FormData.constructor}`
'function Function() { [native code] }'

assert.strictEqual(FormData.prototype.append.length, 2)
assert.strictEqual(FormData.prototype.delete.length, 1)
assert.strictEqual(FormData.prototype.get.length, 1)
Expand Down
Loading