mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:31:00 +00:00
test(extensions): fix shared test helper contracts
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import type { PluginRuntime } from "openclaw/plugin-sdk/bluebubbles";
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import "./test-mocks.js";
|
import "./test-mocks.js";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import os from "node:os";
|
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
||||||
import { afterEach, beforeEach } from "vitest";
|
import { afterEach, beforeEach } from "vitest";
|
||||||
|
|
||||||
export function installTmpDirHarness(params: { prefix: string }) {
|
export function installTmpDirHarness(params: { prefix: string }) {
|
||||||
@@ -8,7 +8,7 @@ export function installTmpDirHarness(params: { prefix: string }) {
|
|||||||
let dbPath = "";
|
let dbPath = "";
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), params.prefix));
|
tmpDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), params.prefix));
|
||||||
dbPath = path.join(tmpDir, "lancedb");
|
dbPath = path.join(tmpDir, "lancedb");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user