Open markwylde opened 2 years ago
The node test runtime comes with it's own timeout.
But unfortunately I can't find a way of letting assertPlan know once the timeout has occurred, or even what the timeout specified was.
So in the end we kinda have to do something like this. IE specify a timeout on the actual test, and one slightly lower on the assertPlan.
test('test 2 assertions will timeout', { timeout: 2000 }, async t => { const assert = assertPlan(2, { timeout: 1500}); assert.strictEqual(1, 1); await assert.wait(); });
Not sure the best solution.
Hopefully there is a hook/feature I'm not aware of we can use: https://github.com/nodejs/node/issues/44125
The node test runtime comes with it's own timeout.
But unfortunately I can't find a way of letting assertPlan know once the timeout has occurred, or even what the timeout specified was.
So in the end we kinda have to do something like this. IE specify a timeout on the actual test, and one slightly lower on the assertPlan.
Not sure the best solution.