Skip to content

Commit

Permalink
style(test): update test case output clarity with lint-friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Nov 18, 2015
1 parent c2551ea commit 24086c0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions spec/operators/catch-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Observable.prototype.catch()', function () {
})
.subscribe(function () { },
function (err) {
expect('this was called').not.toBeTruthy();
done.fail('should not be called');
},
done);
});
Expand All @@ -31,7 +31,7 @@ describe('Observable.prototype.catch()', function () {
.subscribe(function (x) {
expect(x).toBe(expected.shift());
}, function (err) {
expect('this was called').not.toBeTruthy();
done.fail('should not be called');
}, function () {
done();
});
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('Observable.prototype.catch()', function () {
expect(err).toBe('done');
done();
}, function () {
expect('this was called').not.toBeTruthy();
done.fail('should not be called');
});
});

Expand All @@ -78,7 +78,7 @@ describe('Observable.prototype.catch()', function () {
.subscribe(function (x) {
expect(x).toBe(expected.shift());
}, function (err) {
expect('this was called').not.toBeTruthy();
done.fail('should not be called');
}, function () {
done();
});
Expand All @@ -102,7 +102,7 @@ describe('Observable.prototype.catch()', function () {
expect(err).toBe('haha');
done();
}, function () {
expect('this was called').not.toBeTruthy();
done.fail('should not be called');
});
});
});
});
24 changes: 12 additions & 12 deletions spec/util/FastMap-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ describe('FastMap', function () {
});

it('should iterate over keys and values', function () {
var expectedKeys = ['a', 'b', 'c'];
var expectedValues = [1, 2, 3];
var map = new FastMap();
map.set('a', 1);
map.set('b', 2);
map.set('c', 3);
var thisArg = {};

map.forEach(function (value, key) {
var expectedKeys = ['a', 'b', 'c'];
var expectedValues = [1, 2, 3];
var map = new FastMap();
map.set('a', 1);
map.set('b', 2);
map.set('c', 3);
var thisArg = {};

map.forEach(function (value, key) {
expect(this).toBe(thisArg);
expect(value).toBe(expectedValues.shift());
expect(key).toBe(expectedKeys.shift());
}, thisArg);

expect(expectedValues.length).toBe(0);
expect(expectedKeys.length).toBe(0);
});
expect(expectedValues.length).toBe(0);
expect(expectedKeys.length).toBe(0);
});
});
});

0 comments on commit 24086c0

Please sign in to comment.