fake-timers: fake-timers 7 doesn't seem to forward setTimeout args

setTimeout((foo) => {
  console.log(foo) // should log "hello"
}, 1, 'hello')

Refs: https://github.com/nodejs/undici/pull/675#issuecomment-812918698

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 23 (20 by maintainers)

Most upvoted comments

@benjamingr I updated your Twitter link. The underscore was left out (by Github/Markdown) when clicking, which made me wonder why you were speaking Spanish and just posting Samsung holiday offers 😄

See same link:

I can open a PR if you want.

Right, when debugging it’s easier if you force not using workers (although running a single test will always run in band). I don’t think using Node’s worker_threads and child_process APIs necessarily should be classified as “creative” (which is what triggered my response), but that’s neither here nor there (and most certainly off topic for this issue 😀).

What would be a good way to reach out?

Most often by opening an issue, but DM on twitter should be fine in this case 🙂

@dnlup src, PR welcome

A tiny regression test would be great 😃

@dnlup That seems like a good candidate! I agree with you. This seems like losing arguments.

Thanks for all the feedback, I’ll try to inspect it and get back to you.

Just to be clear there are no problems in v6. The problem only happens in v7.

@dnlup FYI

We’ll dig into it further. We had to pin in undici to v6.