Updates Jasmine version.

This commit is contained in:
Yury Delendik 2016-03-29 09:34:13 -05:00
parent df7afcf004
commit 0a700fa29d
25 changed files with 876 additions and 3803 deletions

View file

@ -1,22 +1,32 @@
/* globals expect, it, describe, beforeEach, Stream, PredictorStream, Dict */
/* globals jasmine, expect, it, describe, beforeEach, Stream, PredictorStream,
Dict */
'use strict';
describe('stream', function() {
beforeEach(function() {
this.addMatchers({
toMatchTypedArray: function(expected) {
var actual = this.actual;
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) {
return false;
jasmine.addMatchers({
toMatchTypedArray: function(util, customEqualityTesters) {
return {
compare: function (actual, expected) {
var result = {};
if (actual.length !== expected.length) {
result.pass = false;
result.message = 'Array length: ' + actual.length +
', expected: ' + expected.length;
return result;
}
result.pass = true;
for (var i = 0, ii = expected.length; i < ii; i++) {
var a = actual[i], b = expected[i];
if (a !== b) {
result.pass = false;
break;
}
}
return result;
}
}
return true;
};
}
});
});