-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Bun is running?
--canary
What platform is your computer?
Linux 5.15.0-56-generic x86_64 x86_64
What steps can reproduce the bug?
$ cat test.js
setTimeout(function() {
console.log(arguments.length, ...arguments);
}, 0, "arg1", "arg2");
What is the expected behavior?
$ node test.js
2 arg1 arg2
What do you see instead?
$ bun test.js
0
Additional information
Same goes for setImmediate()
:
$ cat test-immediate.js
setImmediate(function() {
console.log(arguments.length, ...arguments);
}, "arg1", "arg2");
$ node test-immediate.js
2 arg1 arg2
$ bun test-immediate.js
0
whereas process.nextTick()
differs... differently 😅
$ cat test-tick.js
process.nextTick(function() {
console.log(arguments.length, ...arguments);
}, "arg1", "arg2");
$ node test-tick.js
2 arg1 arg2
$ bun test-tick.js
3 arg1 arg2 undefined
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working