-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The node:assert module contains several top level APIs that do not make sense to expose as methods on t.assert. Examples include AssertionError and CallTracker. This commit removes such APIs from t.assert. Refs: #52860 PR-URL: #53049 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
- Loading branch information
Showing
2 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
require('../common'); | ||
const { deepStrictEqual } = require('node:assert'); | ||
const test = require('node:test'); | ||
|
||
test('only methods from node:assert are on t.assert', (t) => { | ||
deepStrictEqual(Object.keys(t.assert).sort(), [ | ||
'deepEqual', | ||
'deepStrictEqual', | ||
'doesNotMatch', | ||
'doesNotReject', | ||
'doesNotThrow', | ||
'equal', | ||
'fail', | ||
'ifError', | ||
'match', | ||
'notDeepEqual', | ||
'notDeepStrictEqual', | ||
'notEqual', | ||
'notStrictEqual', | ||
'ok', | ||
'rejects', | ||
'strictEqual', | ||
'throws', | ||
]); | ||
}); |