mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

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: https://github.com/nodejs/node/pull/52860 PR-URL: https://github.com/nodejs/node/pull/53049 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
26 lines
543 B
JavaScript
26 lines
543 B
JavaScript
'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',
|
|
]);
|
|
});
|