Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

test(package): require executable extracted CLI

奔跑的鑫572c3b76da88
diff --git a/archify/test/cursor-onboarding.test.mjs b/archify/test/cursor-onboarding.test.mjs
index 358becce..30c6a3a2 100644
--- a/archify/test/cursor-onboarding.test.mjs
+++ b/archify/test/cursor-onboarding.test.mjs
@@ -46,6 +46,17 @@ test('the zero-dependency archive works from the canonical Cursor-visible agent
execFileSync('unzip', ['-q', path.join(repoRoot, 'archify.zip'), '-d', agentSkills]);
const installed = path.join(agentSkills, 'archify');
const cli = path.join(installed, 'bin', 'archify.mjs');
+
+ if (process.platform !== 'win32') {
+ assert.equal(
+ fs.statSync(cli).mode & 0o777,
+ 0o755,
+ 'the extracted CLI must retain its Unix executable mode',
+ );
+ const directDoctor = execFileSync(cli, ['doctor'], { encoding: 'utf8' });
+ assert.match(directDoctor, /Archify is ready\./);
+ }
+
const doctor = execFileSync(process.execPath, [cli, 'doctor'], { encoding: 'utf8' });
assert.match(doctor, /Archify is ready\./);