Skip to content

Commit

Permalink
fix: rename isRegexp usage to isRegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
janvennemann authored and sgtcoolguy committed Oct 3, 2019
1 parent cbb8165 commit 8c1e265
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/Resources/ti.internal/extensions/node/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ function deepEqual(actual, expected, strictness, references) {
}

let comparison = COMPARE_TYPE.Object;
if (util.types.isRegexp(actual)) { // RegExp source and flags should match
if (!util.types.isRegexp(expected) || actual.flags !== expected.flags || actual.source !== expected.source) {
if (util.types.isRegExp(actual)) { // RegExp source and flags should match
if (!util.types.isRegExp(expected) || actual.flags !== expected.flags || actual.source !== expected.source) {
return false;
}
// continue on to check properties...
Expand Down Expand Up @@ -624,7 +624,7 @@ function checkError(actual, expected, message) {
// Error type - check type matches
// Error instance - compare properties
if (typeof expected === 'object') {
if (util.types.isRegexp(expected)) {
if (util.types.isRegExp(expected)) {
return expected.test(actual); // does the error match the RegExp expression? if so, pass
}

Expand Down

0 comments on commit 8c1e265

Please sign in to comment.