From 1ab2f8fa5577917453394914bc941bcd0dbd8347 Mon Sep 17 00:00:00 2001 From: Haeun Kim Date: Sat, 11 Nov 2017 23:52:23 +0900 Subject: [PATCH] Fixed some errors of indexeddb (#519) - The `set` method of `indexeddb` returns a boolean. - Put the parameters in the test codes. ISSUE=none --- client/indexeddb/indexeddb.test.ts | 6 +++--- client/indexeddb/indexeddb.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/indexeddb/indexeddb.test.ts b/client/indexeddb/indexeddb.test.ts index 0f7a94fb..19012bf0 100644 --- a/client/indexeddb/indexeddb.test.ts +++ b/client/indexeddb/indexeddb.test.ts @@ -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); }); \ No newline at end of file diff --git a/client/indexeddb/indexeddb.ts b/client/indexeddb/indexeddb.ts index d896fc34..2ebca2e8 100644 --- a/client/indexeddb/indexeddb.ts +++ b/client/indexeddb/indexeddb.ts @@ -18,9 +18,9 @@ export default class IndexedDB{ constructor() {} - async set(key: string, value: object): Promise { + async set(key: string, value: object): Promise { // Not implemented yet - return; + return false; } async get(key: string): Promise {