Skip to content

Commit 24086c0

Browse files
committed
style(test): update test case output clarity with lint-friendly
1 parent c2551ea commit 24086c0

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

spec/operators/catch-spec.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Observable.prototype.catch()', function () {
1111
})
1212
.subscribe(function () { },
1313
function (err) {
14-
expect('this was called').not.toBeTruthy();
14+
done.fail('should not be called');
1515
},
1616
done);
1717
});
@@ -31,7 +31,7 @@ describe('Observable.prototype.catch()', function () {
3131
.subscribe(function (x) {
3232
expect(x).toBe(expected.shift());
3333
}, function (err) {
34-
expect('this was called').not.toBeTruthy();
34+
done.fail('should not be called');
3535
}, function () {
3636
done();
3737
});
@@ -59,7 +59,7 @@ describe('Observable.prototype.catch()', function () {
5959
expect(err).toBe('done');
6060
done();
6161
}, function () {
62-
expect('this was called').not.toBeTruthy();
62+
done.fail('should not be called');
6363
});
6464
});
6565

@@ -78,7 +78,7 @@ describe('Observable.prototype.catch()', function () {
7878
.subscribe(function (x) {
7979
expect(x).toBe(expected.shift());
8080
}, function (err) {
81-
expect('this was called').not.toBeTruthy();
81+
done.fail('should not be called');
8282
}, function () {
8383
done();
8484
});
@@ -102,7 +102,7 @@ describe('Observable.prototype.catch()', function () {
102102
expect(err).toBe('haha');
103103
done();
104104
}, function () {
105-
expect('this was called').not.toBeTruthy();
105+
done.fail('should not be called');
106106
});
107107
});
108-
});
108+
});

spec/util/FastMap-spec.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ describe('FastMap', function () {
5858
});
5959

6060
it('should iterate over keys and values', function () {
61-
var expectedKeys = ['a', 'b', 'c'];
62-
var expectedValues = [1, 2, 3];
63-
var map = new FastMap();
64-
map.set('a', 1);
65-
map.set('b', 2);
66-
map.set('c', 3);
67-
var thisArg = {};
68-
69-
map.forEach(function (value, key) {
61+
var expectedKeys = ['a', 'b', 'c'];
62+
var expectedValues = [1, 2, 3];
63+
var map = new FastMap();
64+
map.set('a', 1);
65+
map.set('b', 2);
66+
map.set('c', 3);
67+
var thisArg = {};
68+
69+
map.forEach(function (value, key) {
7070
expect(this).toBe(thisArg);
7171
expect(value).toBe(expectedValues.shift());
7272
expect(key).toBe(expectedKeys.shift());
7373
}, thisArg);
7474

75-
expect(expectedValues.length).toBe(0);
76-
expect(expectedKeys.length).toBe(0);
77-
});
75+
expect(expectedValues.length).toBe(0);
76+
expect(expectedKeys.length).toBe(0);
77+
});
7878
});
7979
});

0 commit comments

Comments
 (0)