tests: align macmini suite expectations with current behavior (openclaw#22379) thanks @Takhoffman

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
Tak Hoffman
2026-02-20 21:45:04 -06:00
committed by GitHub
parent a305dfe626
commit 22ffde90bb
4 changed files with 17 additions and 10 deletions

View File

@@ -4,6 +4,7 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";
import {
buildProviderRegistry,
createMediaAttachmentCache,
@@ -24,7 +25,9 @@ async function withAudioFixture(
await fs.writeFile(tmpPath, Buffer.from("RIFF"));
const ctx: MsgContext = { MediaPath: tmpPath, MediaType: "audio/wav" };
const media = normalizeMediaAttachments(ctx);
const cache = createMediaAttachmentCache(media);
const cache = createMediaAttachmentCache(media, {
localPathRoots: [resolvePreferredOpenClawTmpDir(), os.tmpdir()],
});
try {
await run({ ctx, media, cache });

View File

@@ -4,6 +4,7 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import { resolvePreferredOpenClawTmpDir } from "../infra/tmp-openclaw-dir.js";
import {
buildProviderRegistry,
createMediaAttachmentCache,
@@ -17,7 +18,9 @@ describe("runCapability deepgram provider options", () => {
await fs.writeFile(tmpPath, Buffer.from("RIFF"));
const ctx: MsgContext = { MediaPath: tmpPath, MediaType: "audio/wav" };
const media = normalizeMediaAttachments(ctx);
const cache = createMediaAttachmentCache(media);
const cache = createMediaAttachmentCache(media, {
localPathRoots: [resolvePreferredOpenClawTmpDir(), os.tmpdir()],
});
let seenQuery: Record<string, string | number | boolean> | undefined;
let seenBaseUrl: string | undefined;