Fix coding style in test/unit/function_spec.js

This commit is contained in:
Jonas Jenwald 2014-03-14 15:35:04 +01:00
parent 7d4acc13fb
commit 3cd64a85ba

View File

@ -10,21 +10,25 @@ describe('function', function() {
this.addMatchers({
toMatchArray: function(expected) {
var actual = this.actual;
if (actual.length != expected.length)
if (actual.length != expected.length) {
return false;
}
for (var i = 0; i < expected.length; i++) {
var a = actual[i], b = expected[i];
if (isArray(b)) {
if (a.length != b.length)
if (a.length != b.length) {
return false;
}
for (var j = 0; j < a.length; j++) {
var suba = a[j], subb = b[j];
if (suba !== subb)
if (suba !== subb) {
return false;
}
}
} else {
if (a !== b)
if (a !== b) {
return false;
}
}
}
return true;