mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 15:04:58 +00:00
test: avoid template-literal temp path in runner fixture
This commit is contained in:
@@ -15,7 +15,7 @@ export async function withAudioFixture(
|
|||||||
filePrefix: string,
|
filePrefix: string,
|
||||||
run: (params: AudioFixtureParams) => Promise<void>,
|
run: (params: AudioFixtureParams) => Promise<void>,
|
||||||
) {
|
) {
|
||||||
const tmpPath = path.join(os.tmpdir(), `${filePrefix}-${Date.now()}.wav`);
|
const tmpPath = path.join(os.tmpdir(), filePrefix + "-" + Date.now().toString() + ".wav");
|
||||||
await fs.writeFile(tmpPath, Buffer.from("RIFF"));
|
await fs.writeFile(tmpPath, Buffer.from("RIFF"));
|
||||||
const ctx: MsgContext = { MediaPath: tmpPath, MediaType: "audio/wav" };
|
const ctx: MsgContext = { MediaPath: tmpPath, MediaType: "audio/wav" };
|
||||||
const media = normalizeMediaAttachments(ctx);
|
const media = normalizeMediaAttachments(ctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user