Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
068199b5e9 | |||
0eb8193e4a |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/webstore",
|
"name": "@pushrocks/webstore",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/webstore",
|
"name": "@pushrocks/webstore",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "high performance storage in the browser using indexed db",
|
"description": "high performance storage in the browser using indexed db",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -15,7 +15,14 @@ tap.test('should init the database', async () => {
|
|||||||
await testWebstore.init();
|
await testWebstore.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should store a value', async () => {
|
tap.test('should allow storing a string', async () => {
|
||||||
|
await testWebstore.set('mystring', 'heythere');
|
||||||
|
expect(await testWebstore.get('mystring')).to.equal('heythere');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tap.test('should allow storing an object', async () => {
|
||||||
await testWebstore.set('testProp1', {
|
await testWebstore.set('testProp1', {
|
||||||
wow: 'wowVal'
|
wow: 'wowVal'
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user