Skip to content

Commit

Permalink
Add assertion to test that bypasses cache to ensure same-record.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Nov 19, 2024
1 parent e917c41 commit dd2c8e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/mocha/10-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ describe('Cache', function() {
});
const record2 = await cache.get({id});
record1.should.eql(record2);
// should fetch the same record again after clearing the cache
cache._ENTRY_CACHE.cache.reset();
const record3 = await cache.get({id});
record2.should.eql(record3);
});

it('should replace an existing cache entry', async () => {
Expand Down

0 comments on commit dd2c8e1

Please sign in to comment.