# test\(server\): run fake provider CLIs through a Node stub on every host · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/b4e082c2d33a1197543f2c9425f1e0b82ddacbbe)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: b4e082c2d33a1197543f2c9425f1e0b82ddacbbe

Requested commit: b4e082c2d33a1197543f2c9425f1e0b82ddacbbe

Commit: b4e082c2d33a1197543f2c9425f1e0b82ddacbbe

Tree: 480435cb3d1428f4e2ece31a4fb68805521399cc

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
test(server): run fake provider CLIs through a Node stub on every host

Seven suites faked a provider CLI with a #!/bin/sh script made executable
by chmod, which Windows cannot run: the shebang is ignored and there is no
extension for PATHEXT to match, so the spawn either failed or fell through
to a real CLI on PATH. CodexTextGeneration's fake was a 120-line sh
argument parser.

Add apps/server/src/testUtils/fakeCli.ts. writeFakeCli writes the CLI's
behaviour as a Node stub and a launcher shaped for the host: a shebang
script on posix, a .cmd shim on Windows, which resolveSpawnCommand already
routes through a shell. execScriptSource covers the common case of handing
over to the mock ACP agent after an argv check. ClaudeTextGeneration, which
had its own .cmd branch, moves onto the shared helper too.

The tests that assert the agent logged SIGTERM on stop are skipped on
Windows, where the child is terminated rather than signalled.

Co-Authored-By: Claude Code <noreply@anthropic.com>

```

## Parents

- [00bf96a629144b9d6e92112ade8c6ce35e6f7f3e](https://git.cafe/pingdotgg/t3code/commit/00bf96a629144b9d6e92112ade8c6ce35e6f7f3e?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/b4e082c2d33a1197543f2c9425f1e0b82ddacbbe?format=markdown)
