hmpo-countries-lib
Advanced tools
Comparing version 1.0.3 to 1.1.0
{ | ||
"name": "hmpo-countries-lib", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "Country lists", | ||
@@ -30,3 +30,3 @@ "main": "index.js", | ||
"debug": "^2.6.3", | ||
"hmpo-cached-model": "^1.0.4", | ||
"hmpo-cached-model": "^1.1.0", | ||
"underscore": "^1.8.3" | ||
@@ -33,0 +33,0 @@ }, |
@@ -9,4 +9,10 @@ # hmpo-countries-lib | ||
let redisFactory = { | ||
getClient() { | ||
return redisInstance; | ||
} | ||
} | ||
let countriesLib = new CountriesLib({ | ||
store: redisInstance, | ||
store: redisFactory, | ||
key: 'store-key-prefix', | ||
@@ -13,0 +19,0 @@ storeInterval: 10000, // 10 seconds |
@@ -37,2 +37,5 @@ 'use strict'; | ||
stubs = { | ||
storeFactory: { | ||
getClient: sinon.stub() | ||
}, | ||
store: { | ||
@@ -57,2 +60,4 @@ get: sinon.stub(), | ||
stubs.storeFactory.getClient.returns(stubs.store); | ||
stubs.HmpoCachedModel | ||
@@ -66,3 +71,3 @@ .onCall(0).returns(stubs.countryCache) | ||
key: 'test', | ||
store: stubs.store, | ||
store: stubs.storeFactory, | ||
storeInterval: 1000, | ||
@@ -105,3 +110,3 @@ countryInterval: 2000, | ||
url: 'http://example.com/countries', | ||
store: stubs.store, | ||
store: stubs.storeFactory, | ||
key: 'test-countries', | ||
@@ -118,3 +123,3 @@ apiInterval: 2000, | ||
url: 'http://example.com/policy', | ||
store: stubs.store, | ||
store: stubs.storeFactory, | ||
key: 'test-policy', | ||
@@ -121,0 +126,0 @@ apiInterval: 3000, |
Sorry, the diff of this file is not supported yet
19560
393
41
Updatedhmpo-cached-model@^1.1.0