From ca2378eac9ce9618550a8a3fbc445da8dc793d20 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 17 Sep 2015 19:43:37 +0100 Subject: [PATCH] es6 goodness --- test/spec/angular-locker.spec.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/test/spec/angular-locker.spec.js b/test/spec/angular-locker.spec.js index 25da3ce..7068194 100644 --- a/test/spec/angular-locker.spec.js +++ b/test/spec/angular-locker.spec.js @@ -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); })); @@ -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(); })); @@ -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(); @@ -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();