Comparing version 1.2.1 to 1.2.2
@@ -146,4 +146,7 @@ "use strict" | ||
if (a.length === b.length && (a instanceof Array && b instanceof Array || aIsArgs && bIsArgs)) { | ||
for (var i = 0; i < a.length; i++) { | ||
if (!deepEqual(a[i], b[i])) return false | ||
var aKeys = Object.getOwnPropertyNames(a), bKeys = Object.getOwnPropertyNames(b) | ||
if (aKeys.length !== bKeys.length) return false | ||
var larger = aKeys.length < bKeys.length ? bKeys : aKeys | ||
for (var i = 0; i < larger.length; i++) { | ||
if (!deepEqual(a[larger[i]], b[larger[i]])) return false | ||
} | ||
@@ -150,0 +153,0 @@ return true |
{ | ||
"name": "ospec", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Noiseless testing framework", | ||
@@ -5,0 +5,0 @@ "main": "ospec.js", |
@@ -7,3 +7,3 @@ # ospec | ||
Version: 1.2.1 | ||
Version: 1.2.2 | ||
License: MIT | ||
@@ -10,0 +10,0 @@ |
@@ -31,3 +31,3 @@ "use strict" | ||
o("assertions", function() { | ||
o.only("assertions", function() { | ||
var spy = o.spy() | ||
@@ -40,2 +40,10 @@ spy(a) | ||
o([{a: 1, b: 2}, {c: 3}]).deepEquals([{a: 1, b: 2}, {c: 3}]) | ||
var monkeypatch1 = [1, 2] | ||
monkeypatch1.field = 3 | ||
var monkeypatch2 = [1, 2] | ||
monkeypatch2.field = 4 | ||
o(monkeypatch1).notDeepEquals([1, 2]) | ||
o(monkeypatch1).notDeepEquals(monkeypatch2) | ||
@@ -42,0 +50,0 @@ var values = ["a", "", 1, 0, true, false, null, undefined, Date(0), ["a"], [], function() {return arguments}.call(), new Uint8Array(), {a: 1}, {}] |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22408
302