Skip to content

Commit e810600

Browse files
mkruisselbrinkjgraham
authored andcommitted
Don't call test.step for promise_tests too soon. (web-platform-tests#209)
Calling test.step starts the timeout for the test, for promise tests this shouldn't happen until the the previous promise_test finished, and the current test is actually being started. This fixes web-platform-tests#208
1 parent 484fd84 commit e810600

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

testharness.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,9 @@ policies and contribution forms [3].
523523
function promise_test(func, name, properties) {
524524
var test = async_test(name, properties);
525525
// If there is no promise tests queue make one.
526-
test.step(function() {
527-
if (!tests.promise_tests) {
528-
tests.promise_tests = Promise.resolve();
529-
}
530-
});
526+
if (!tests.promise_tests) {
527+
tests.promise_tests = Promise.resolve();
528+
}
531529
tests.promise_tests = tests.promise_tests.then(function() {
532530
return Promise.resolve(test.step(func, test, test))
533531
.then(

0 commit comments

Comments
 (0)