diff options
author | Luca Casonato <hello@lcas.dev> | 2021-11-11 10:28:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 10:28:06 +0100 |
commit | 08067b5e12dc8d486c42e3997dbfd0766666ecb5 (patch) | |
tree | c5b0da64c9095e238c2aea3bef5a1aaf724bcad1 /cli/tests | |
parent | e00bfecf960a7d1c60542e04d17c4e558083f8e9 (diff) |
fix: add typings for AbortSignal.reason (#12730)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/abort_controller_test.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/unit/abort_controller_test.ts b/cli/tests/unit/abort_controller_test.ts index 46c0e9394..50a17ad24 100644 --- a/cli/tests/unit/abort_controller_test.ts +++ b/cli/tests/unit/abort_controller_test.ts @@ -54,3 +54,9 @@ unitTest(function controllerHasProperToString() { const actual = Object.prototype.toString.call(new AbortController()); assertEquals(actual, "[object AbortController]"); }); + +unitTest(function abortReason() { + const signal = AbortSignal.abort("hey!"); + assertEquals(signal.aborted, true); + assertEquals(signal.reason, "hey!"); +}); |