(spy: SinonSpy)
| 177 | }; |
| 178 | |
| 179 | export async function waitTillBeenCalled(spy: SinonSpy): Promise<void> { |
| 180 | const start = process.hrtime.bigint(), |
| 181 | calls = spy.callCount; |
| 182 | |
| 183 | do { |
| 184 | if (process.hrtime.bigint() - start > 1_000_000_000) { |
| 185 | throw new Error('Waiting for more than 1 second'); |
| 186 | } |
| 187 | |
| 188 | await setTimeout(50); |
| 189 | } while (spy.callCount === calls); |
| 190 | } |
| 191 | |
| 192 | export const BLOCKING_MIN_VALUE = ( |
| 193 | utils.isVersionGreaterThan([7]) ? Number.MIN_VALUE : |
no outgoing calls
no test coverage detected