Skip to content

Commit 04b90b4

Browse files
lib: add ok as a self-reference
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 4346e61 commit 04b90b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/assert.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,10 @@ function strict(...args) {
880880
innerOk(strict, args.length, ...args);
881881
}
882882

883+
// TODO(aduh95): take `ok` from `Assert.prototype` instead of a self-ref in a next major.
884+
assert.ok = assert;
883885
ArrayPrototypeForEach([
884-
'ok', 'fail', 'equal', 'notEqual', 'deepEqual', 'notDeepEqual',
886+
'fail', 'equal', 'notEqual', 'deepEqual', 'notDeepEqual',
885887
'deepStrictEqual', 'notDeepStrictEqual', 'strictEqual',
886888
'notStrictEqual', 'partialDeepStrictEqual', 'match', 'doesNotMatch',
887889
'throws', 'rejects', 'doesNotThrow', 'doesNotReject', 'ifError',

0 commit comments

Comments
 (0)