Skip to content

Commit

Permalink
Fixed some errors of indexeddb (#519)
Browse files Browse the repository at this point in the history
- The `set` method of `indexeddb` returns a boolean.
- Put the parameters in the test codes.

ISSUE=none
  • Loading branch information
haeungun authored and romandev committed Nov 11, 2017
1 parent a3c0e11 commit 1ab2f8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/indexeddb/indexeddb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import { } from 'jest';
import absolute from '../absolute';

test('absolute.indexeddb.set()', async () => {
expect(await absolute.indexeddb.set()).toBe();
expect(await absolute.indexeddb.set('test_key', {v: 'value'})).toBe(false);
});

test('absolute.indexeddb.get()', async () => {
expect(await absolute.indexeddb.get()).toBe(null);
expect(await absolute.indexeddb.get('test_key')).toBe(null);
});

test('absolute.indexeddb.remove()', async () => {
expect(await absolute.indexeddb.remove()).toBe(null);
expect(await absolute.indexeddb.remove('test_key')).toBe(null);
});
4 changes: 2 additions & 2 deletions client/indexeddb/indexeddb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export default class IndexedDB{

constructor() {}

async set(key: string, value: object): Promise<void> {
async set(key: string, value: object): Promise<boolean> {
// Not implemented yet
return;
return false;
}

async get(key: string): Promise<object> {
Expand Down

0 comments on commit 1ab2f8f

Please sign in to comment.