From 95fac7e5f9f7ddf2ed3d0c6b74693fda27732654 Mon Sep 17 00:00:00 2001 From: Shook Date: Mon, 19 Aug 2024 13:53:25 +0800 Subject: [PATCH] fix: call redis.flush() on beforeAll() --- test/setup.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/setup.ts b/test/setup.ts index df7dadf4..231e531a 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -1,10 +1,10 @@ -import { afterAll, vi } from 'vitest'; +import { beforeAll, vi } from 'vitest'; import container from '../src/container'; if (process.env.CI_REDIS_URL) { vi.stubEnv('REDIS_URL', process.env.CI_REDIS_URL); } -afterAll(async () => { +beforeAll(async () => { container.cradle.redis.flushall(); });