Skip to content

Commit

Permalink
test: increase coverage for AbortController
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lxxyx authored and jasnell committed May 5, 2021
1 parent d5c7345 commit 7d74487
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-abortcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
'use strict';

const common = require('../common');
const { inspect } = require('util');

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

Expand Down Expand Up @@ -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 } }');
}

0 comments on commit 7d74487

Please sign in to comment.