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 93a41a7 commit f0e7f0aCopy full SHA for f0e7f0a
test/utils/getTestLlama.ts
@@ -1,7 +1,20 @@
1
+import {afterAll} from "vitest";
2
import {getLlama, Llama} from "../../src/index.js";
3
+import {isCI} from "../../src/config.js";
4
5
let llamaPromise: Promise<Llama> | null = null;
6
7
+afterAll(async () => {
8
+ if (!isCI)
9
+ return;
10
+
11
+ if (llamaPromise != null) {
12
+ const temp = llamaPromise;
13
+ llamaPromise = null;
14
+ await (await temp).dispose();
15
+ }
16
+});
17
18
export async function getTestLlama() {
19
if (llamaPromise != null)
20
return await llamaPromise;
0 commit comments