You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Demo code test.js
There are 2 serial tests: both needs 3 seconds to run, both well below the default 5 seconds timeout limit.
const{ test }=require('zora');functiondelay(ms){returnnewPromise(resolve=>{setTimeout(resolve,ms);});}test('group',asynct=>{awaitt.test('one',asynct=>{awaitdelay(3000);t.ok(1);});awaitt.test('two',asynct=>{awaitdelay(3000);t.ok(2);});});
But the test "two" failed on the 5 secs limit check.
> node test.js
TAP version 13
# group
# one
ok 1 - should be truthy
# two
ok 2 - should be truthy
not ok 3 - The test did no complete on time. refer to https://github.com/lorenzofox3/zora/tree/master/zora#test-timeout for more info
---
operator: "timeout"
actual: "test takes longer than 5000ms to complete"
expected: "test takes less than 5000ms to complete"
...
1..3
# tests 3
# pass 2
# fail 1
# skip 0
The reason is the timeout check started at same time for both tests: "one" and "two", the timeout check should only start for each test at the time it really starts.
The bug only appears if users use await to force serial tests.
The text was updated successfully, but these errors were encountered:
Demo code test.js
There are 2 serial tests: both needs 3 seconds to run, both well below the default 5 seconds timeout limit.
But the test "two" failed on the 5 secs limit check.
The reason is the timeout check started at same time for both tests: "one" and "two", the timeout check should only start for each test at the time it really starts.
The bug only appears if users use await to force serial tests.
The text was updated successfully, but these errors were encountered: