We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b32d4f commit 155e50dCopy full SHA for 155e50d
src/__tests__/cache.test.js
@@ -78,7 +78,7 @@ describe('createCachingMethods', () => {
78
it(`caches`, async () => {
79
await api.findOneById('id1', { ttl: 1 })
80
const value = await cache.get(cacheKey('id1'))
81
- expect(value).toBe(docs.id1)
+ expect(JSON.parse(value)).toEqual(docs.id1)
82
83
await api.findOneById('id1')
84
expect(collection.find.mock.calls.length).toBe(1)
@@ -96,7 +96,7 @@ describe('createCachingMethods', () => {
96
97
98
const valueBefore = await cache.get(cacheKey('id1'))
99
- expect(valueBefore).toBe(docs.id1)
+ expect(JSON.parse(valueBefore)).toEqual(docs.id1)
100
101
await api.deleteFromCacheById('id1')
102
0 commit comments