fix(core): update
This commit is contained in:
@ -5,8 +5,8 @@ let testWebstore: webstore.WebStore;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testWebstore = new webstore.WebStore({
|
||||
dbName: 'mytestdb',
|
||||
storeName: 'myteststore'
|
||||
dbName: 'mytest-db',
|
||||
storeName: 'mytest-store'
|
||||
});
|
||||
expect(testWebstore).to.be.instanceOf(webstore.WebStore);
|
||||
});
|
||||
@ -22,4 +22,18 @@ tap.test('should store a value', async () => {
|
||||
console.log(JSON.stringify(await testWebstore.get('testProp1')));
|
||||
});
|
||||
|
||||
tap.test('should overwrite a value', async () => {
|
||||
await testWebstore.set('testProp1', {
|
||||
wow: 'wowVal2'
|
||||
});
|
||||
console.log(JSON.stringify(await testWebstore.get('testProp1')));
|
||||
});
|
||||
|
||||
tap.test('should correctly check the existence of keys', async () => {
|
||||
const resultNotThere = await testWebstore.check('notThere');
|
||||
const resultThere = await testWebstore.check('testProp1');
|
||||
expect(resultNotThere).to.be.false;
|
||||
expect(resultThere).to.be.true;
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user