Skip to content

Commit 4f1ba79

Browse files
Lxxyxtargos
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 <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>
1 parent 4c67437 commit 4f1ba79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/parallel/test-abortcontroller.js

+9
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
const { Event } = require('internal/event_target');
@@ -133,3 +134,11 @@ const { Event } = require('internal/event_target');
133134
);
134135
}
135136
}
137+
138+
{
139+
const ac = new AbortController();
140+
strictEqual(inspect(ac, { depth: 1 }),
141+
'AbortController { signal: [AbortSignal] }');
142+
strictEqual(inspect(ac, { depth: null }),
143+
'AbortController { signal: AbortSignal { aborted: false } }');
144+
}

0 commit comments

Comments
 (0)