Skip to content

Commit 7d74487

Browse files
Lxxyxjasnell
authored andcommitted
test: increase coverage for AbortController
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/abort_controller.js.html#L126 PR-URL: #38514 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent d5c7345 commit 7d74487

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/parallel/test-abortcontroller.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict';
33

44
const common = require('../common');
5+
const { inspect } = require('util');
56

67
const { ok, strictEqual, throws } = require('assert');
78

@@ -132,3 +133,11 @@ const { ok, strictEqual, throws } = require('assert');
132133
);
133134
}
134135
}
136+
137+
{
138+
const ac = new AbortController();
139+
strictEqual(inspect(ac, { depth: 1 }),
140+
'AbortController { signal: [AbortSignal] }');
141+
strictEqual(inspect(ac, { depth: null }),
142+
'AbortController { signal: AbortSignal { aborted: false } }');
143+
}

0 commit comments

Comments
 (0)