|
|
@ -15,6 +15,11 @@ describe("background/infrastructures/memory-storage", () => { |
|
|
|
expect(cache.get('object')).to.deep.equal({ hello: '123' }); |
|
|
|
expect(cache.get('object')).to.deep.equal({ hello: '123' }); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('returns undefined if no keys', () => { |
|
|
|
|
|
|
|
let cache = new MemoryStorage(); |
|
|
|
|
|
|
|
expect(cache.get('no-keys')).to.be.undefined; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('stored on shared memory', () => { |
|
|
|
it('stored on shared memory', () => { |
|
|
|
let cache = new MemoryStorage(); |
|
|
|
let cache = new MemoryStorage(); |
|
|
|
cache.set('red', 'apple'); |
|
|
|
cache.set('red', 'apple'); |
|
|
|