| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 253a704 commit 5e99598
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -221,11 +221,18 @@ try { | |||
| 221 | 221 | added: | |
| 222 | 222 | - v14.2.0 | |
| 223 | 223 | - v12.19.0 | |
| 224 | + changes: | ||
| 225 | + - version: REPLACEME | ||
| 226 | + pr-url: https://github.com/nodejs/node/pull/47740 | ||
| 227 | + description: the `assert.CallTracker` class has been deprecated and will be | ||
| 228 | + removed in a future version. | ||
| 224 | 229 | --> | |
| 225 | 230 | ||
| 226 | - > Stability: 1 - Experimental | ||
| 231 | + > Stability: 0 - Deprecated | ||
| 227 | 232 | ||
| 228 | - This feature is currently experimental and behavior might still change. | ||
| 233 | + This feature is deprecated and will be removed in a future version. | ||
| 234 | + Please consider using alternatives such as the | ||
| 235 | + [`mock`][] helper function. | ||
| 229 | 236 | ||
| 230 | 237 | ### `new assert.CallTracker()` | |
| 231 | 238 | ||
@@ -2559,6 +2566,7 @@ argument. | |||
| 2559 | 2566 | [`assert.strictEqual()`]: #assertstrictequalactual-expected-message | |
| 2560 | 2567 | [`assert.throws()`]: #assertthrowsfn-error-message | |
| 2561 | 2568 | [`getColorDepth()`]: tty.md#writestreamgetcolordepthenv | |
| 2569 | + [`mock`]: test.md#mocking | ||
| 2562 | 2570 | [`process.on('exit')`]: process.md#event-exit | |
| 2563 | 2571 | [`tracker.calls()`]: #trackercallsfn-exact | |
| 2564 | 2572 | [`tracker.verify()`]: #trackerverify | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3360,6 +3360,21 @@ Type: Runtime | |||
| 3360 | 3360 | In a future version of Node.js, the `asyncResource` property will no longer | |
| 3361 | 3361 | be added when a function is bound to an `AsyncResource`. | |
| 3362 | 3362 | ||
| 3363 | + ### DEP0173: the `assert.CallTracker` class | ||
| 3364 | + | ||
| 3365 | + <!-- YAML | ||
| 3366 | + changes: | ||
| 3367 | + - version: REPLACEME | ||
| 3368 | + pr-url: https://github.com/nodejs/node/pull/47740 | ||
| 3369 | + description: Documentation-only deprecation. | ||
| 3370 | + --> | ||
| 3371 | + | ||
| 3372 | + Type: Documentation-only | ||
| 3373 | + | ||
| 3374 | + In a future version of Node.js, [`assert.CallTracker`][], | ||
| 3375 | + will be removed. | ||
| 3376 | + Consider using alternatives such as the [`mock`][] helper function. | ||
| 3377 | + | ||
| 3363 | 3378 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | |
| 3364 | 3379 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 | |
| 3365 | 3380 | [RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4 | |
@@ -3383,6 +3398,7 @@ be added when a function is bound to an `AsyncResource`. | |||
| 3383 | 3398 | [`Server.listen({fd: <number>})`]: net.md#serverlistenhandle-backlog-callback | |
| 3384 | 3399 | [`SlowBuffer`]: buffer.md#class-slowbuffer | |
| 3385 | 3400 | [`WriteStream.open()`]: fs.md#class-fswritestream | |
| 3401 | + [`assert.CallTracker`]: assert.md#class-assertcalltracker | ||
| 3386 | 3402 | [`assert`]: assert.md | |
| 3387 | 3403 | [`asyncResource.runInAsyncScope()`]: async_context.md#asyncresourceruninasyncscopefn-thisarg-args | |
| 3388 | 3404 | [`buffer.subarray`]: buffer.md#bufsubarraystart-end | |
@@ -3440,6 +3456,7 @@ be added when a function is bound to an `AsyncResource`. | |||
| 3440 | 3456 | [`message.socket`]: http.md#messagesocket | |
| 3441 | 3457 | [`message.trailersDistinct`]: http.md#messagetrailersdistinct | |
| 3442 | 3458 | [`message.trailers`]: http.md#messagetrailers | |
| 3459 | + [`mock`]: test.md#mocking | ||
| 3443 | 3460 | [`module.createRequire()`]: module.md#modulecreaterequirefilename | |
| 3444 | 3461 | [`os.networkInterfaces()`]: os.md#osnetworkinterfaces | |
| 3445 | 3462 | [`os.tmpdir()`]: os.md#ostmpdir | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,7 +66,7 @@ const { inspect } = require('internal/util/inspect'); | |||
| 66 | 66 | const { isPromise, isRegExp } = require('internal/util/types'); | |
| 67 | 67 | const { EOL } = require('internal/constants'); | |
| 68 | 68 | const { BuiltinModule } = require('internal/bootstrap/realm'); | |
| 69 | - const { isError } = require('internal/util'); | ||
| 69 | + const { isError, deprecate } = require('internal/util'); | ||
| 70 | 70 | ||
| 71 | 71 | const errorCache = new SafeMap(); | |
| 72 | 72 | const CallTracker = require('internal/assert/calltracker'); | |
@@ -1049,7 +1049,7 @@ assert.doesNotMatch = function doesNotMatch(string, regexp, message) { | |||
| 1049 | 1049 | internalMatch(string, regexp, message, doesNotMatch); | |
| 1050 | 1050 | }; | |
| 1051 | 1051 | ||
| 1052 | - assert.CallTracker = CallTracker; | ||
| 1052 | + assert.CallTracker = deprecate(CallTracker, 'assert.CallTracker is deprecated.', 'DEP0173'); | ||
| 1053 | 1053 | ||
| 1054 | 1054 | /** | |
| 1055 | 1055 | * Expose a strict only variant of assert. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments