Skip to content

Commit

Permalink
chore(lint): lint commonSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen authored and wawyed committed Mar 3, 2018
1 parent 8e47f9a commit 57a87b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/commonSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('common', function() {

it('should filter objects', function() {
const input = { foo: 1, bar: 2, baz: 3, qux: 4 };
const filtered = filter(input, function(val, key) { return val > 2; });
const filtered = filter(input, function(value, _key) { return value > 2; });
expect(Object.keys(filtered).length).toBe(2);
expect(filtered).toEqual({ baz: 3, qux: 4 });
});
Expand Down Expand Up @@ -99,18 +99,18 @@ describe('common', function() {
});

it('should accept functions with parameters', function() {
function fn(foo, bar) {}
function fn(_foo, _bar) {}
expect(isInjectable(fn)).toBeTruthy();
});

it('should accept ng1 annotated functions', function() {
fn['$inject'] = ['foo', 'bar'];
function fn (foo, bar) {}
function fn (_foo, _bar) {}
expect(isInjectable(fn)).toBeTruthy();
});

it('should accept ng1 array notation', function() {
const fn = ['foo', 'bar', function(foo, bar) {}];
const fn = ['foo', 'bar', function(_foo, _bar) {}];
expect(isInjectable(fn)).toBeTruthy();
});
});
Expand Down

0 comments on commit 57a87b7

Please sign in to comment.