Skip to content

Commit

Permalink
test_runner: add @ljharb suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
  • Loading branch information
ErickWendel committed May 1, 2023
1 parent 71ffd10 commit a0f8afd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/internal/test_runner/mock/fake_timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ const {
const PriorityQueue = require('internal/priority_queue');

function compareTimersLists(a, b) {
const expiryDiff = a.runAt - b.runAt;
if (expiryDiff === 0) {
if (a.id < b.id)
return -1;
if (a.id > b.id)
return 1;
}
return expiryDiff;
return (a.runAt - b.runAt) || (a.id - b.id);
}

function setPosition(node, pos) {
Expand Down

0 comments on commit a0f8afd

Please sign in to comment.