mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: increase coverage for AbortController
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/abort_controller.js.html#L126 PR-URL: https://github.com/nodejs/node/pull/38514 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
1 parent
d5c734587c
commit
7d74487820
1 file changed
+9
@@ -2,6 +2,7 @@
|
||||
'use strict';
|
||||
|
||||
const common = require('../common');
|
||||
const { inspect } = require('util');
|
||||
|
||||
const { ok, strictEqual, throws } = require('assert');
|
||||
|
||||
@@ -132,3 +133,11 @@ const { ok, strictEqual, throws } = require('assert');
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const ac = new AbortController();
|
||||
strictEqual(inspect(ac, { depth: 1 }),
|
||||
'AbortController { signal: [AbortSignal] }');
|
||||
strictEqual(inspect(ac, { depth: null }),
|
||||
'AbortController { signal: AbortSignal { aborted: false } }');
|
||||
}
|
||||
Reference in new issue
Block a user