| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5eeac8c commit 4fcc2c1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,24 +56,24 @@ function blockingCallback(callback) { | |||
| 56 | 56 | common.busyLoop(TIMEOUT); | |
| 57 | 57 | ||
| 58 | 58 | timeCallbackScheduled = Timer.now(); | |
| 59 | - setTimeout(blockingCallback, TIMEOUT); | ||
| 59 | + setTimeout(blockingCallback.bind(null, callback), TIMEOUT); | ||
| 60 | 60 | } | |
| 61 | 61 | } | |
| 62 | 62 | ||
| 63 | - function testAddingTimerToEmptyTimersList(callback) { | ||
| 63 | + const testAddingTimerToEmptyTimersList = common.mustCall(function(callback) { | ||
| 64 | 64 | initTest(); | |
| 65 | 65 | // Call setTimeout just once to make sure the timers list is | |
| 66 | 66 | // empty when blockingCallback is called. | |
| 67 | 67 | setTimeout(blockingCallback.bind(null, callback), TIMEOUT); | |
| 68 | - } | ||
| 68 | + }); | ||
| 69 | 69 | ||
| 70 | - function testAddingTimerToNonEmptyTimersList() { | ||
| 70 | + const testAddingTimerToNonEmptyTimersList = common.mustCall(function() { | ||
| 71 | 71 | initTest(); | |
| 72 | 72 | // Call setTimeout twice with the same timeout to make | |
| 73 | 73 | // sure the timers list is not empty when blockingCallback is called. | |
| 74 | 74 | setTimeout(blockingCallback, TIMEOUT); | |
| 75 | 75 | setTimeout(blockingCallback, TIMEOUT); | |
| 76 | - } | ||
| 76 | + }); | ||
| 77 | 77 | ||
| 78 | 78 | // Run the test for the empty timers list case, and then for the non-empty | |
| 79 | 79 | // timers list one | |
| Back | FazBrowse Home | New Git URL |
0 commit comments