Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "keyv", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Simple key/value store with support for multiple backends", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -13,3 +13,4 @@ 'use strict'; | ||
postgresql: 'keyv-postgres', | ||
postgres: 'keyv-postgres' | ||
postgres: 'keyv-postgres', | ||
mysql: 'keyv-mysql' | ||
}; | ||
@@ -16,0 +17,0 @@ if (opts.adapter || opts.uri) { |
@@ -33,3 +33,3 @@ import test from 'ava'; | ||
t.is(await keyv.get('foo'), 'bar'); | ||
await delay(100); | ||
await delay(150); | ||
t.is(await keyv.get('foo'), 'bar'); | ||
@@ -43,3 +43,3 @@ }); | ||
t.is(await keyv.get('foo'), 'bar'); | ||
await delay(110); | ||
await delay(150); | ||
t.is(await keyv.get('foo'), undefined); | ||
@@ -50,17 +50,17 @@ }); | ||
const store = new Map(); | ||
const keyv = new Keyv({ store, ttl: 100 }); | ||
const keyv = new Keyv({ store, ttl: 200 }); | ||
await keyv.set('foo', 'bar'); | ||
await keyv.set('fizz', 'buzz', 50); | ||
await keyv.set('ping', 'pong', 150); | ||
await keyv.set('fizz', 'buzz', 100); | ||
await keyv.set('ping', 'pong', 300); | ||
t.is(await keyv.get('foo'), 'bar'); | ||
t.is(await keyv.get('fizz'), 'buzz'); | ||
t.is(await keyv.get('ping'), 'pong'); | ||
await delay(60); | ||
await delay(150); | ||
t.is(await keyv.get('foo'), 'bar'); | ||
t.is(await keyv.get('fizz'), undefined); | ||
t.is(await keyv.get('ping'), 'pong'); | ||
await delay(50); | ||
await delay(100); | ||
t.is(await keyv.get('foo'), undefined); | ||
t.is(await keyv.get('ping'), 'pong'); | ||
await delay(50); | ||
await delay(100); | ||
t.is(await keyv.get('ping'), undefined); | ||
@@ -67,0 +67,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9892
168