From 66cd4b10a08c1a796e8b962893666ac13e5017e3 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Fri, 6 Sep 2024 13:31:52 +0200 Subject: [PATCH] test: stub env --- src/memory/tokenMemory.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/memory/tokenMemory.test.ts b/src/memory/tokenMemory.test.ts index 6c72790d..08f20218 100644 --- a/src/memory/tokenMemory.test.ts +++ b/src/memory/tokenMemory.test.ts @@ -23,6 +23,10 @@ import * as R from "remeda"; import { verifyDeserialization } from "@tests/e2e/utils.js"; describe("Token Memory", () => { + beforeEach(() => { + vi.stubEnv("GENAI_API_KEY", "123"); + }); + const getInstance = (config: { llmFactor: number; localFactor: number; @@ -111,7 +115,6 @@ describe("Token Memory", () => { }); it("Serializes", async () => { - vi.stubEnv("GENAI_API_KEY", "123"); const instance = getInstance({ llmFactor: 2, localFactor: 1,