Skip to content

Commit

Permalink
fix: broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed May 18, 2022
1 parent cc0a5c1 commit 723299e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/api/__tests__/cache.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ describe('#get', () => {
});

it('should support the legacy `path` property in the cache store', async () => {
const file = path.join(examplesDir, 'readme.yaml');
cacheStore = new Cache(file);
await cacheStore.saveFile();

const cache = cacheStore.getCache();
cache['44ec0da6e10c8806831ba3d4126c1b66'].path = path.join(
cacheStore.specsCache,
`${cache['44ec0da6e10c8806831ba3d4126c1b66'].hash}.json`
);
const cacheKey = Object.keys(cache)[0];
cache[cacheKey].path = path.join(cacheStore.specsCache, `${cache[cacheKey].hash}.json`);

delete cache['44ec0da6e10c8806831ba3d4126c1b66'].hash;
delete cache[cacheKey].hash;

expect(Object.keys(cache)).toHaveLength(1);

Expand Down

0 comments on commit 723299e

Please sign in to comment.