remove isa
This commit is contained in:
@@ -37,7 +37,7 @@ function deepCompare(expected, actual, path) {
|
||||
};
|
||||
}
|
||||
|
||||
if ((expected instanceof blob) && (actual instanceof blob)) {
|
||||
if (is_blob(expected) && is_blob(actual)) {
|
||||
stone_if_needed(expected); stone_if_needed(actual)
|
||||
if (expected.length != actual.length)
|
||||
return { passed: false, messages: [`blob length mismatch at ${path}: ${expected.length} vs ${actual.length}`] }
|
||||
@@ -48,7 +48,7 @@ function deepCompare(expected, actual, path) {
|
||||
return { passed: true, messages: [] }
|
||||
}
|
||||
|
||||
if (isa(expected, array) && isa(actual, array)) {
|
||||
if (is_array(expected) && is_array(actual)) {
|
||||
if (expected.length != actual.length)
|
||||
return {
|
||||
passed: false,
|
||||
@@ -64,7 +64,7 @@ function deepCompare(expected, actual, path) {
|
||||
return { passed: messages.length == 0, messages: messages };
|
||||
}
|
||||
|
||||
if (isa(expected, object) && isa(actual, object)) {
|
||||
if (is_object(expected) && is_object(actual)) {
|
||||
var expKeys = array(expected).sort();
|
||||
var actKeys = array(actual).sort();
|
||||
if (JSON.stringify(expKeys) != JSON.stringify(actKeys))
|
||||
@@ -91,7 +91,7 @@ function deepCompare(expected, actual, path) {
|
||||
function makeTest(test) {
|
||||
return function() {
|
||||
var encoded = test.replacer ? nota.encode(test.input, test.replacer) : nota.encode(test.input);
|
||||
if (!(encoded instanceof blob)){
|
||||
if (!is_blob(encoded)){
|
||||
throw "encode() should return blob";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user