Finished tests

This commit is contained in:
Gregory Schier 2016-11-09 23:37:46 -08:00
parent ea8b530da7
commit 77495ceff8
3 changed files with 11 additions and 7 deletions

View File

@ -20,8 +20,19 @@ describe('LocalStorage()', () => {
it('does basic operations', () => {
const basePath = `/tmp/insomnia-localstorage-${Math.random()}`;
const localStorage = new LocalStorage(basePath);
// Test get and set
localStorage.setItem('foo', 'bar 1');
localStorage.setItem('foo', 'bar');
expect(localStorage.getItem('foo', 'BAD')).toBe('bar');
// Test Object storage
localStorage.setItem('obj', {foo: 'bar', arr: [1, 2, 3]});
expect(localStorage.getItem('obj')).toEqual({foo: 'bar', arr: [1, 2, 3]});
// Test default values
expect(localStorage.getItem('dne', 'default')).toEqual('default');
expect(localStorage.getItem('dne')).toEqual('default');
});
it('stores a key', () => {

View File

@ -1,7 +0,0 @@
import jwkUtils from '../jwk';
describe('LocalStorage()', () => {
it('create directory', async () => {
expect(true).toEqual(true);
});
});

View File