mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
assert: port common.mustCall() to assert
Fixes: https://github.com/nodejs/node/issues/31392 PR-URL: https://github.com/nodejs/node/pull/31982 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
This commit is contained in:
parent
01e158c600
commit
50d28d4b3a
10 changed files with 388 additions and 3 deletions
|
@ -51,6 +51,7 @@ const { NativeModule } = require('internal/bootstrap/loaders');
|
|||
const { isError } = require('internal/util');
|
||||
|
||||
const errorCache = new Map();
|
||||
const CallTracker = require('internal/assert/calltracker');
|
||||
|
||||
let isDeepEqual;
|
||||
let isDeepStrictEqual;
|
||||
|
@ -928,6 +929,8 @@ assert.doesNotMatch = function doesNotMatch(string, regexp, message) {
|
|||
internalMatch(string, regexp, message, doesNotMatch);
|
||||
};
|
||||
|
||||
assert.CallTracker = CallTracker;
|
||||
|
||||
// Expose a strict only variant of assert
|
||||
function strict(...args) {
|
||||
innerOk(strict, args.length, ...args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue