()
| 135 | currentTime += ms; |
| 136 | } |
| 137 | function flushTasks() { |
| 138 | ensureLogIsEmpty(); |
| 139 | |
| 140 | // If there's a continuation, it will call postTask again |
| 141 | // which will set nextTask. That means we need to clear |
| 142 | // nextTask before the invocation, otherwise we would |
| 143 | // delete the continuation task. |
| 144 | const prevTaskQueue = taskQueue; |
| 145 | taskQueue = new Map(); |
| 146 | for (const [, {id, callback, resolve}] of prevTaskQueue) { |
| 147 | log(`Task ${id} Fired`); |
| 148 | callback(false); |
| 149 | resolve(); |
| 150 | } |
| 151 | } |
| 152 | function log(val) { |
| 153 | eventLog.push(val); |
| 154 | } |
nothing calls this directly
no test coverage detected