Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
es6 goodness
Browse files Browse the repository at this point in the history
  • Loading branch information
tymondesigns committed Sep 17, 2015
1 parent 5b18f2d commit ca2378e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/spec/angular-locker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ describe('angular-locker', () => {

it('should put an item into the locker', inject((locker) => {

locker.put('fnKey', () => {
return 12 * 12;
});
locker.put('fnKey', () => 12 * 12);

expect( locker.get('fnKey') ).toEqual(144);
}));
Expand Down Expand Up @@ -518,9 +516,7 @@ describe('angular-locker', () => {
it('should remove an item from locker when passing a function', inject((locker) => {
locker.put('someKey', 'someVal');

locker.forget(() => {
return 'someKey';
});
locker.forget(() => 'someKey');

expect( locker.get('someKey') ).not.toBeDefined();
}));
Expand All @@ -534,9 +530,7 @@ describe('angular-locker', () => {
};
});

locker.forget(() => {
return ['something', 'anotherThing'];
});
locker.forget(() => ['something', 'anotherThing']);

expect( locker.get('something') ).not.toBeDefined();
expect( locker.get('anotherThing') ).not.toBeDefined();
Expand Down Expand Up @@ -615,9 +609,7 @@ describe('angular-locker', () => {
it('should determine whether an item exists in locker when passing a function', inject((locker) => {
locker.put('randKey', Math.random());

var result = locker.has(() => {
return 'randKey';
});
var result = locker.has(() => 'randKey');

expect(result).toBeTruthy();
expect( locker.has('loremipsumdolorsitamet') ).toBeFalsy();
Expand Down

0 comments on commit ca2378e

Please sign in to comment.