mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-04-30 22:12:32 +08:00
Tests: align pnpm test expectations with main
This commit is contained in:
@@ -1,23 +1,13 @@
|
||||
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
renderBundledRootHelpText,
|
||||
writeCliStartupMetadata,
|
||||
} from "../../scripts/write-cli-startup-metadata.ts";
|
||||
import { writeCliStartupMetadata } from "../../scripts/write-cli-startup-metadata.ts";
|
||||
import { createScriptTestHarness } from "./test-helpers.js";
|
||||
|
||||
describe("write-cli-startup-metadata", () => {
|
||||
const { createTempDir } = createScriptTestHarness();
|
||||
|
||||
it("captures bundled root help text from the CLI program", async () => {
|
||||
const rootHelpText = await renderBundledRootHelpText();
|
||||
|
||||
expect(rootHelpText).toContain("Usage:");
|
||||
expect(rootHelpText).toContain("openclaw");
|
||||
});
|
||||
|
||||
it("writes startup metadata with populated root help text", async () => {
|
||||
it("writes startup metadata with populated root help text when dist falls back to source rendering", async () => {
|
||||
const tempRoot = createTempDir("openclaw-startup-metadata-");
|
||||
const distDir = path.join(tempRoot, "dist");
|
||||
const extensionsDir = path.join(tempRoot, "extensions");
|
||||
|
||||
Reference in New Issue
Block a user