We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d3b74e commit 75092a8Copy full SHA for 75092a8
tests/accuracy/createIndex.test.ts
@@ -1,7 +1,19 @@
1
+import { afterAll, beforeAll } from "vitest";
2
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
3
import { Matcher } from "./sdk/matcher.js";
4
-process.env.MDB_VOYAGE_API_KEY = "valid-key";
5
+let originalApiKey: string | undefined;
6
+beforeAll(() => {
7
+ originalApiKey = process.env.MDB_VOYAGE_API_KEY;
8
+
9
+ // We just need a valid key when registering the tool, the actual value is not important
10
+ if (!originalApiKey) {
11
+ process.env.MDB_VOYAGE_API_KEY = "valid-key";
12
+ }
13
+});
14
+afterAll(() => {
15
+ process.env.MDB_VOYAGE_API_KEY = originalApiKey;
16
17
18
describeAccuracyTests([
19
{
0 commit comments