diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:28:14 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:48:39 +0900 |
commit | 029d5365e7d74e87375fccb8db097b7c2df3f7f4 (patch) | |
tree | 6a24c719da9c60461c7e2fe120b0d42af9e580f2 /test/background/infrastructures | |
parent | d72012529bcd820598fa64e1aa20dab1c16acaa5 (diff) |
npm run lint:fix
Diffstat (limited to 'test/background/infrastructures')
-rw-r--r-- | test/background/infrastructures/MemoryStorage.test.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/background/infrastructures/MemoryStorage.test.ts b/test/background/infrastructures/MemoryStorage.test.ts index 95d3780..ccdf9f0 100644 --- a/test/background/infrastructures/MemoryStorage.test.ts +++ b/test/background/infrastructures/MemoryStorage.test.ts @@ -2,7 +2,7 @@ import MemoryStorage from 'background/infrastructures/MemoryStorage'; describe("background/infrastructures/memory-storage", () => { it('stores values', () => { - let cache = new MemoryStorage(); + const cache = new MemoryStorage(); cache.set('number', 123); expect(cache.get('number')).to.equal(123); @@ -14,7 +14,7 @@ describe("background/infrastructures/memory-storage", () => { }); it('returns undefined if no keys', () => { - let cache = new MemoryStorage(); + const cache = new MemoryStorage(); expect(cache.get('no-keys')).to.be.undefined; }) @@ -23,22 +23,22 @@ describe("background/infrastructures/memory-storage", () => { cache.set('red', 'apple'); cache = new MemoryStorage(); - let got = cache.get('red'); + const got = cache.get('red'); expect(got).to.equal('apple'); }); it('stored cloned objects', () => { - let cache = new MemoryStorage(); - let recipe = { sugar: '300g' }; + const cache = new MemoryStorage(); + const recipe = { sugar: '300g' }; cache.set('recipe', recipe); recipe.salt = '20g' - let got = cache.get('recipe', recipe); + const got = cache.get('recipe', recipe); expect(got).to.deep.equal({ sugar: '300g' }); }); it('throws an error with unserializable objects', () => { - let cache = new MemoryStorage(); + const cache = new MemoryStorage(); expect(() => cache.set('fn', setTimeout)).to.throw(); }) }); |