-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_runner: add ref methods to mocked timers #51809
test_runner: add ref methods to mocked timers #51809
Conversation
Review requested:
|
6979093
to
284e496
Compare
284e496
to
9139eba
Compare
9139eba
to
c87a2a2
Compare
@@ -844,4 +844,38 @@ describe('Mock Timers Test Suite', () => { | |||
clearTimeout(id); | |||
}); | |||
}); | |||
|
|||
describe('Api should have same public properties as original', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding tests that go over all properties so we won't have that problem again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you meanb internal mock properties that are not part of the original Timeout object?
please rebase to include #51834 |
c87a2a2
to
ce96e7d
Compare
Landed in 6cb8a60 |
Fixes: #51701 PR-URL: #51809 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
Fixes: #51701 PR-URL: #51809 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
Fixes: #51701 PR-URL: #51809 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
Fixes: nodejs#51701 PR-URL: nodejs#51809 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
Fixes: #51701
It adds properties
ref
,unref
,refresh
,hasRef
to mock timers for compatibility.