mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
test: update WPT abort tests
PR-URL: https://github.com/nodejs/node/pull/39697 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
24673ace8a
commit
45420013ee
4 files changed
+14
-7
No files matched your search
Vendored
+1
-1
@@ -12,7 +12,7 @@ Last update:
|
||||
|
||||
- common: https://github.com/web-platform-tests/wpt/tree/03c5072aff/common
|
||||
- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
|
||||
- dom/abort: https://github.com/web-platform-tests/wpt/tree/1728d198c9/dom/abort
|
||||
- dom/abort: https://github.com/web-platform-tests/wpt/tree/c49cafb491/dom/abort
|
||||
- encoding: https://github.com/web-platform-tests/wpt/tree/35f70910d3/encoding
|
||||
- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI
|
||||
- hr-time: https://github.com/web-platform-tests/wpt/tree/9910784394/hr-time
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
test(t => {
|
||||
const signal = AbortSignal.abort();
|
||||
assert_true(signal instanceof AbortSignal, "returned object is an AbortSignal");
|
||||
assert_true(signal.aborted, "returned signal is already aborted");
|
||||
}, "the AbortSignal.abort() static returns an already aborted signal");
|
||||
|
||||
async_test(t => {
|
||||
const s = AbortSignal.abort();
|
||||
s.addEventListener("abort", t.unreached_func("abort event listener called"));
|
||||
s.onabort = t.unreached_func("abort event handler called");
|
||||
t.step_timeout(() => { t.done(); }, 2000);
|
||||
}, "signal returned by AbortSignal.abort() should not fire abort event");
|
||||
-5
@@ -64,9 +64,4 @@ test(t => {
|
||||
controller.abort();
|
||||
}, "the abort event should have the right properties");
|
||||
|
||||
test(t => {
|
||||
const signal = AbortSignal.abort();
|
||||
assert_true(signal.aborted);
|
||||
}, "the AbortSignal.abort() static returns an already aborted signal");
|
||||
|
||||
done();
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@
|
||||
"path": "console"
|
||||
},
|
||||
"dom/abort": {
|
||||
"commit": "1728d198c92834d92f7f399ef35e7823d5bfa0e4",
|
||||
"commit": "c49cafb491d99d6318f8f24a26936cc66501f412",
|
||||
"path": "dom/abort"
|
||||
},
|
||||
"encoding": {
|
||||
|
||||
Reference in new issue
Block a user