fix(test): stop FORCE_COLOR/CCAM_COLOR leaking into spawned ccam CLI children

The sandbox's ambient FORCE_COLOR=3 was inherited by every ccam-cli.test.js
child process spawn, defeating the CLI's own "colors off when piped" default
and breaking every plain-text output assertion (help text, piped output,
offline-mode rendering).
This commit is contained in:
2026-08-04 09:04:59 +07:00
parent 72f74f9104
commit 2c313084a8
+6
View File
@@ -29,6 +29,12 @@ process.env.DASHBOARD_DB_PATH = path.join(TMP, "dashboard.db");
process.env.CLAUDE_HOME = path.join(TMP, "home");
process.env.DASHBOARD_DATA_DIR = path.join(TMP, "data");
process.env.DASHBOARD_LIVENESS_PROBE = "0";
// Every spawn below inherits `process.env` — a shell that forces color
// (FORCE_COLOR/CCAM_COLOR set in the environment running this test) would
// leak into the spawned CLI child and defeat its own "colors off when piped"
// behavior, which every plain-text assertion in this file assumes.
delete process.env.FORCE_COLOR;
delete process.env.CCAM_COLOR;
const { createApp, startServer } = require("../index");
const { db } = require("../db");