( callback: string | ((...args: unknown[]) => unknown), delay = 0, ...args: unknown[] )
| 139 | } |
| 140 | |
| 141 | function fakeSetTimeout( |
| 142 | callback: string | ((...args: unknown[]) => unknown), |
| 143 | delay = 0, |
| 144 | ...args: unknown[] |
| 145 | ): number { |
| 146 | assertIsCallbackFunction(callback, "setTimeout"); |
| 147 | if (!time) throw new TimeError("Cannot set timeout: time is not faked"); |
| 148 | return setTimer(callback, delay, args, false); |
| 149 | } |
| 150 | |
| 151 | function fakeClearTimeout(id?: unknown) { |
| 152 | if (!time) throw new TimeError("Cannot clear timeout: time is not faked"); |
no test coverage detected