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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
c3bc48f632
commit
4fe081df44
@ -1,7 +1,3 @@
|
||||
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
|
||||
//
|
||||
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
|
||||
//
|
||||
// Originally from narwhal.js (http://narwhaljs.org)
|
||||
// Copyright (c) 2009 Thomas Robinson <280north.com>
|
||||
//
|
||||
@ -213,7 +209,7 @@ function _deepEqual(actual, expected, strict, memos) {
|
||||
}
|
||||
|
||||
function isArguments(object) {
|
||||
return Object.prototype.toString.call(object) == '[object Arguments]';
|
||||
return Object.prototype.toString.call(object) === '[object Arguments]';
|
||||
}
|
||||
|
||||
function objEquiv(a, b, strict, actualVisitedObjects) {
|
||||
@ -299,7 +295,7 @@ function expectedException(actual, expected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Object.prototype.toString.call(expected) == '[object RegExp]') {
|
||||
if (Object.prototype.toString.call(expected) === '[object RegExp]') {
|
||||
return expected.test(actual);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user