Skip to content

Commit ac59ddc

Browse files
committed
test: port flaky wpt/html/webappapis/timers tests to test/sequential
1 parent 6675505 commit ac59ddc

18 files changed

+111
-129
lines changed

test/fixtures/wpt/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Last update:
2121
- html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob
2222
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
2323
- html/webappapis/structured-clone: https://github.com/web-platform-tests/wpt/tree/47d3fb280c/html/webappapis/structured-clone
24-
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers
2524
- interfaces: https://github.com/web-platform-tests/wpt/tree/df731dab88/interfaces
2625
- performance-timeline: https://github.com/web-platform-tests/wpt/tree/17ebc3aea0/performance-timeline
2726
- resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing

test/fixtures/wpt/html/webappapis/timers/cleartimeout-clearinterval.any.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/evil-spec-example.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/missing-timeout-setinterval.any.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/negative-setinterval.any.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/negative-settimeout.any.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/type-long-setinterval.any.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/fixtures/wpt/html/webappapis/timers/type-long-settimeout.any.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/fixtures/wpt/versions.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
"commit": "47d3fb280c9c632e684dee3b78ae1f4c5d5ba640",
4444
"path": "html/webappapis/structured-clone"
4545
},
46-
"html/webappapis/timers": {
47-
"commit": "5873f2d8f1f7bbb9c64689e52d04498614632906",
48-
"path": "html/webappapis/timers"
49-
},
5046
"interfaces": {
5147
"commit": "df731dab88a1a25c04eb7e6238c11dc28fda0801",
5248
"path": "interfaces"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// This is a port of https://github.com/web-platform-tests/wpt/blob/22ecfc9/html/webappapis/timers/clearinterval-from-callback.any.js
6+
7+
let wasPreviouslyCalled = false;
8+
9+
const handle = setInterval(() => {
10+
if (!wasPreviouslyCalled) {
11+
wasPreviouslyCalled = true;
12+
13+
clearInterval(handle);
14+
15+
setInterval(process.exit, 750);
16+
} else {
17+
common.mustNotCall()();
18+
}
19+
}, 500);

0 commit comments

Comments
 (0)