fix(test): restore live media harness entrypoint · openclaw/openclaw@e0ec42e
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Test Live Media tests cover test live media script behavior. |
| 2 | +import { spawnSync } from "node:child_process"; |
2 | 3 | import { describe, expect, it } from "vitest"; |
3 | 4 | import { |
4 | 5 | MEDIA_SUITES, |
@@ -8,6 +9,22 @@ import {
|
8 | 9 | } from "../../scripts/test-live-media.ts"; |
9 | 10 | |
10 | 11 | describe("scripts/test-live-media", () => { |
| 12 | +it("prints help through the real node --import tsx entrypoint", () => { |
| 13 | +const result = spawnSync( |
| 14 | +process.execPath, |
| 15 | +["--import", "tsx", "scripts/test-live-media.ts", "--help"], |
| 16 | +{ |
| 17 | +cwd: process.cwd(), |
| 18 | +encoding: "utf8", |
| 19 | +}, |
| 20 | +); |
| 21 | + |
| 22 | +expect(result.status).toBe(0); |
| 23 | +expect(result.stdout).toContain("Media live harness"); |
| 24 | +expect(result.stdout).toContain("pnpm test:live:media"); |
| 25 | +expect(result.stderr).toBe(""); |
| 26 | +}); |
| 27 | + |
11 | 28 | it("rejects unknown global providers for the selected suites", () => { |
12 | 29 | expect(() => |
13 | 30 | parseArgs(["image", "--providers", "definitely-not-a-provider", "--all-providers"]), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。