test: refactor several parallel/test-timer tests#10524
test: refactor several parallel/test-timer tests#10524BethGriggs wants to merge 2 commits intonodejs:masterfrom
Conversation
There was a problem hiding this comment.
Since you're already in here refactoring, could you also change the assert.equal() on this line to assert.strictEqual()?
There was a problem hiding this comment.
Updated - I missed that one
|
CI: https://ci.nodejs.org/job/node-test-pull-request/5624/ (although I guess we'll want to re-run it after the |
cda395e to
3213d6e
Compare
Fishrock123
left a comment
There was a problem hiding this comment.
Also, does test-timers-uncaught-exception.js still work even if you reduce the delays to 1?
There was a problem hiding this comment.
This will fail because what was actually registered was a function returned from common.mustCall().
I don't think you can have async errors during exit though, so this should be unnecessary I think.
There was a problem hiding this comment.
I removed the whole function.
Change var to const/let. Simplify test-timers-uncaught-exception.
3213d6e to
7d2a771
Compare
e6119a8 to
ff0f0c8
Compare
|
@Fishrock123 updated to address comments, PTAL. Test still passes with 1ms timeout. |
|
Landed in 7c77932 |
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: #10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: nodejs#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: nodejs#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: #10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: nodejs#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: nodejs#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
|
This does not land cleanly in LTS. Would someone be willing to backport? |
Change var to const/let. Simplify test-timers-uncaught-exception. PR-URL: nodejs#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception. Backport-PR-URL: nodejs/node#12401 PR-URL: nodejs/node#10524 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Change var to const/let. Simplify test-timers-uncaught-exception.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test
Description of change
Refactored several of the parallel/test-timer-* tests - mainly changing vars to const and adding common.mustCall() where possible. parallel/test-timers-uncaught-exception has been simplified. Any further suggestions for improvement are welcome 😄