(promise, ms = 2000)
| 6 | import store from '../../lib/store.js' |
| 7 | |
| 8 | const 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 | |
| 17 | describe('pause external handler hook', () => { |
| 18 | afterEach(() => { |