Skip to content

CLI tests: cli-agent.test.ts expects the old verify usage line and fails on main #193

Closed

Description

@FredApps

What went wrong?

Something else: a CLI test fails on main.

DiffCI version

main at 40aa308 (CLI 0.3.54)

Command you ran

npm test in packages/diffci-cli (or node --import tsx --test tests/client/cli-agent.test.ts)

Environment

Ubuntu, Node.js 24.22.1, terminal.

What happens

tests/client/cli-agent.test.ts, test "prints check and init as first-class commands", still expects the old verify usage line:

assert.match(result.stdout, /diffci verify \[--changed \| --base <sha> --head <sha>\]/);

Since 8949f5d ("feat(verify): --staged and --paths verify only what will be committed") the help prints:

  diffci verify [--changed | --staged | --paths <file...> | --paths-from <file|-> | --base <sha> --head <sha>]

so the test fails:

✖ prints check and init as first-class commands
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /diffci verify \[--changed \| --base <sha> --head <sha>\]/.

This was not caught because the cli-package job in .github/workflows/ci.yml runs typecheck, build, package:check and package:smoke for the CLI package, but not its npm test.

What you expected

The test matches the current usage line, and the CLI package's tests pass on main.

Regression test

The linked pull request updates the assertion to the current usage line. The test fails on main and passes with the change.

Activity

  1. added 2 commits that reference this issue on Nov 17, 2026
  2. added a commit that references this issue on Nov 18, 2026
    5d38919
  3. added a commit that references this issue on Nov 18, 2026
    722e6a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions