Files
truthmark/tests/cli/check-workflow.test.ts
Merlin's CatGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>MerlinHCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
9fa9ac25a4 feat: add workflow eval framework (#32)
* feat: add workflow eval framework

Add workflow evaluation scenarios, rubrics, schemas, and runner scripts for installed Truthmark workflows.

Move research notes under docs/research and migrate tests from Vitest to node:test.

* Potential fix for pull request finding 'CodeQL / Replacement of a substring with itself'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: MerlinH <merlinh221@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-06-30 20:57:55 +10:00

51 lines
1.4 KiB
TypeScript

import { describe, it } from "node:test";
import { expect } from "expect";
import { runCli } from "../helpers/run-cli.js";
describe("truthmark check workflow options", () => {
it("does not expose workflow helper mode", async () => {
const help = await runCli(["check", "--help"]);
expect(help.exitCode).toBe(0);
expect(help.stdout).not.toContain("--workflow");
});
it("rejects old workflow helper invocations as unsupported", async () => {
const result = await runCli([
"check",
"--json",
"--workflow",
"truth-sync",
]);
expect(result.exitCode).not.toBe(0);
expect(result.stdout).toBe("");
expect(result.stderr.toLowerCase()).toContain("unknown option");
});
});
describe("truthmark workflow command surface", () => {
it("exposes workflow status without workflow instructions", async () => {
const help = await runCli(["workflow", "--help"]);
expect(help.exitCode).toBe(0);
expect(help.stdout).toContain("status");
expect(help.stdout).not.toContain("instructions");
});
it("rejects removed workflow instructions invocations as unsupported", async () => {
const result = await runCli([
"workflow",
"instructions",
"--workflow",
"truthmark-sync",
"--json",
]);
expect(result.exitCode).not.toBe(0);
expect(result.stdout).toBe("");
expect(result.stderr.toLowerCase()).toContain("unknown command");
});
});