Skip to content

Commit 6bcc841

Browse files
Trottitaloacasas
authored andcommitted
assert: apply minor refactoring
* Remove comment referring to the CommonJS Unit Testing 1.0 spec. This module is no longer intended to comply with that spec. * Remove puzzling "THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!" comment. No doubt, it made sense at one time. * Favor `===` over `==` in two places. PR-URL: #11511 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ff85483 commit 6bcc841

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/assert.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
2-
//
3-
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
4-
//
51
// Originally from narwhal.js (http://narwhaljs.org)
62
// Copyright (c) 2009 Thomas Robinson <280north.com>
73
//
@@ -213,7 +209,7 @@ function _deepEqual(actual, expected, strict, memos) {
213209
}
214210

215211
function isArguments(object) {
216-
return Object.prototype.toString.call(object) == '[object Arguments]';
212+
return Object.prototype.toString.call(object) === '[object Arguments]';
217213
}
218214

219215
function objEquiv(a, b, strict, actualVisitedObjects) {
@@ -299,7 +295,7 @@ function expectedException(actual, expected) {
299295
return false;
300296
}
301297

302-
if (Object.prototype.toString.call(expected) == '[object RegExp]') {
298+
if (Object.prototype.toString.call(expected) === '[object RegExp]') {
303299
return expected.test(actual);
304300
}
305301

0 commit comments

Comments
 (0)