You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MockTimers does not implement Timeout API correctl #62815
Here, timeout should be a Timeout object, but lacks to [Symbol.dispose] property. stack.use(...) fails with TypeError: Symbol(Symbol.dispose) is not a function.
How often does it reproduce? Is there a required condition?
Triggers always when:
MockTimers are enabled,
code under test uses setTimeout with using or other explicit resource management features.
What is the expected behavior? Why is that the expected behavior?
Timeout objects produced by MockTimers should implement the API as documented in Node's documentation, i.e. the objects should have the [Symbol.dispose] property, and calling its function should cancel the timeout.
The [Symbol.dispose] property is part of a stable API.
As an aside, timeout.close() is missing as well. While the documentation rightfully labels it as legacy, it is far from deprecated and should be supported by MockTimers.
Activity
test_runner: align mock timeout api
test_runner: align mock timeout api
test_runner: align mock timeout api