MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / settles

Function settles

test/unit/pause_test.js:8–15  ·  view source on GitHub ↗
(promise, ms = 2000)

Source from the content-addressed store, hash-verified

6import store from '../../lib/store.js'
7
8const settles = (promise, ms = 2000) =>
9 Promise.race([
10 promise,
11 new Promise((_, reject) => {
12 const t = setTimeout(() => reject(new Error(`did not settle within ${ms}ms`)), ms)
13 t.unref?.()
14 }),
15 ])
16
17describe('pause external handler hook', () => {
18 afterEach(() => {

Callers 1

pause_test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected