Make cache-manager tests strictNullChecks safe (#42686)

The new code in cache-manager wasn't strictNullChecks safe, which caused
problems because a community member enabled strictNullChecks in most
packages during the review period for that code.

This change just fixes the tests, although the optional methods on Store
are a bit suspicious. From skimming cache-manager's documentation, I
couldn't figure out if having the methods be optional was accurate.
This commit is contained in:
Nathan Shively-Sanders
2020-02-27 09:50:39 -08:00
committed by GitHub
parent e1f3734de2
commit e7e259f3fe

View File

@@ -49,10 +49,11 @@ memoryCache.wrap<{ id: number, name: string }>(key, (cb: any) => {
});
});
memoryCache.store.keys().then((result) => {
//console.log(result);
});
if (memoryCache.store.keys) {
memoryCache.store.keys().then((result) => {
//console.log(result);
});
}
const multiCache = cacheManager.multiCaching([memoryCache]);