Skip to content

Commit 74a7520

Browse files
committed
fix: Fix cache test missing awaits
1 parent 64489f7 commit 74a7520

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/backend/tests/cache/cache.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ describe('#Caching', function () {
5959

6060
withLocalTmpDir(async () => {
6161

62-
const [keyv, flat] = initFileCache({ cacheDir: process.cwd() });
62+
const [keyv, flat] = await initFileCache({ cacheDir: process.cwd() });
6363

6464
const now = dayjs();
6565

6666
await keyv.set('foo', now);
6767
flat.save();
6868

69-
const [cleanKeyv, cleanFlat] = initFileCache({ cacheDir: process.cwd() });
69+
const [cleanKeyv, cleanFlat] = await initFileCache({ cacheDir: process.cwd() });
7070

7171
const time = await cleanKeyv.get('foo');
7272

@@ -82,14 +82,14 @@ describe('#Caching', function () {
8282

8383
withLocalTmpDir(async () => {
8484

85-
const [keyv, flat] = initFileCache({ cacheDir: process.cwd() });
85+
const [keyv, flat] = await initFileCache({ cacheDir: process.cwd() });
8686

8787
const prog = new ListenProgressPositional({ timestamp: dayjs(), position: 35, positionPercent: 50 });
8888

8989
await keyv.set('foo', prog);
9090
await flat.save();
9191

92-
const [cleanKeyv, cleanFlat] = initFileCache({ cacheDir: process.cwd() });
92+
const [cleanKeyv, cleanFlat] = await initFileCache({ cacheDir: process.cwd() });
9393

9494
const cachedProg = await cleanKeyv.get('foo');
9595

0 commit comments

Comments
 (0)