|
|
|
@ -9,13 +9,15 @@ describe('stream', function() {
@@ -9,13 +9,15 @@ describe('stream', function() {
|
|
|
|
|
this.addMatchers({ |
|
|
|
|
toMatchTypedArray: function(expected) { |
|
|
|
|
var actual = this.actual; |
|
|
|
|
if (actual.length != expected.length) |
|
|
|
|
if (actual.length != expected.length) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
for (var i = 0, ii = expected.length; i < ii; i++) { |
|
|
|
|
var a = actual[i], b = expected[i]; |
|
|
|
|
if (a !== b) |
|
|
|
|
if (a !== b) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|