diff --git a/spec/javascript/test_str_encodings_escaping_enc.js b/spec/javascript/test_str_encodings_escaping_enc.js index 538b86f16..3e26b25d5 100644 --- a/spec/javascript/test_str_encodings_escaping_enc.js +++ b/spec/javascript/test_str_encodings_escaping_enc.js @@ -10,7 +10,7 @@ function validateErr(expectedEncoding, err) { } else if (Object.getPrototypeOf(err) === Error.prototype) { var regex = /^Encoding not recognized: '(.*)' \(searched as: '.*'\)$/; var match = err.message.match(regex); - assert.notStrictEqual(match, null, "message [" + err.message + "] does not match regex " + regex); + assert.ok(match !== null, "message [" + err.message + "] does not match regex " + regex); assert.strictEqual(match[1], expectedEncoding); } else { assert.fail("expected " + RangeError.name + " or " + Error.name + ", but got " + err); diff --git a/spec/javascript/test_str_encodings_escaping_to_s.js b/spec/javascript/test_str_encodings_escaping_to_s.js index 111c8cee3..d125a9426 100644 --- a/spec/javascript/test_str_encodings_escaping_to_s.js +++ b/spec/javascript/test_str_encodings_escaping_to_s.js @@ -19,7 +19,7 @@ function validateErr(expectedEncoding, err) { // instead of a RangeError, so we'll accept that as well. var regex = /^Encoding not recognized: '(.*)' \(searched as: '.*'\)$/; var match = err.message.match(regex); - assert.notStrictEqual(match, null, "message [" + err.message + "] does not match regex " + regex); + assert.ok(match !== null, "message [" + err.message + "] does not match regex " + regex); assert.strictEqual(match[1], expectedEncoding); } else { assert.fail("expected " + RangeError.name + " or " + Error.name + ", but got " + err);