assert: deprecate callTracker

PR-URL: https://github.com/nodejs/node/pull/47740
Fixes: https://github.com/nodejs/node/issues/47492
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Moshe Atlow 2023-04-29 09:57:08 +03:00 committed by GitHub
parent c968361829
commit adf332be32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 4 deletions

View file

@ -66,7 +66,7 @@ const { inspect } = require('internal/util/inspect');
const { isPromise, isRegExp } = require('internal/util/types');
const { EOL } = require('internal/constants');
const { BuiltinModule } = require('internal/bootstrap/realm');
const { isError } = require('internal/util');
const { isError, deprecate } = require('internal/util');
const errorCache = new SafeMap();
const CallTracker = require('internal/assert/calltracker');
@ -1049,7 +1049,7 @@ assert.doesNotMatch = function doesNotMatch(string, regexp, message) {
internalMatch(string, regexp, message, doesNotMatch);
};
assert.CallTracker = CallTracker;
assert.CallTracker = deprecate(CallTracker, 'assert.CallTracker is deprecated.', 'DEP0173');
/**
* Expose a strict only variant of assert.