Skip to content

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

test: align merged site and onboarding contracts

tt-a1if70f683294b8
diff --git a/archify/test/copy-site-assets.test.mjs b/archify/test/copy-site-assets.test.mjs
index d1c689b6..de04efee 100644
--- a/archify/test/copy-site-assets.test.mjs
+++ b/archify/test/copy-site-assets.test.mjs
@@ -409,7 +409,12 @@ test('copySiteAssets atomically refreshes regular assets and leaves no temporary
if (previousUmask !== undefined) process.umask(previousUmask);
}
- for (const asset of ['site-language.js', 'site-navigation.css']) {
+ for (const asset of [
+ 'site-language.js',
+ 'site-navigation.css',
+ 'archify-lockup-light.svg',
+ 'archify-mark.svg',
+ ]) {
assert.deepEqual(
fs.readFileSync(path.join(assets, asset)),
fs.readFileSync(path.join(canonicalAssets, asset)),
@@ -418,5 +423,10 @@ test('copySiteAssets atomically refreshes regular assets and leaves no temporary
if (process.platform !== 'win32') {
assert.equal(fs.statSync(existing).mode & 0o777, 0o666);
}
- assert.deepEqual(fs.readdirSync(assets).sort(), ['site-language.js', 'site-navigation.css']);
+ assert.deepEqual(fs.readdirSync(assets).sort(), [
+ 'archify-lockup-light.svg',
+ 'archify-mark.svg',
+ 'site-language.js',
+ 'site-navigation.css',
+ ]);
});
diff --git a/archify/test/cursor-onboarding.test.mjs b/archify/test/cursor-onboarding.test.mjs
index 78c6e5ac..344da9c4 100644
--- a/archify/test/cursor-onboarding.test.mjs
+++ b/archify/test/cursor-onboarding.test.mjs
@@ -19,8 +19,10 @@ test('Cursor onboarding stays explicit, bilingual, and backed by the same Skill'
const landing = fs.readFileSync(path.join(repoRoot, 'docs', 'index.html'), 'utf8');
assert.equal(english, englishMirror, 'English README mirrors must stay synchronized');
- assert.match(english, /Cursor, Claude Code, Codex CLI, OpenCode, and GitHub Copilot/);
- assert.match(chinese, /Cursor、Claude Code、Codex CLI、OpenCode 和 GitHub Copilot/);
+ for (const agent of ['Cursor', 'Claude Code', 'Codex CLI', 'OpenCode']) {
+ assert.ok(english.includes(agent), `English README must name ${agent}`);
+ assert.ok(chinese.includes(agent), `Chinese README must name ${agent}`);
+ }
for (const surface of [english, chinese, landing]) assert.ok(surface.includes(cursorCommand));
for (const surface of [english, chinese, start, landing]) {
assert.doesNotMatch(surface, /skills use[^\n<]*--agent cursor/);
@@ -28,11 +30,15 @@ test('Cursor onboarding stays explicit, bilingual, and backed by the same Skill'
assert.doesNotMatch(surface, /all Cursor models|every Cursor model/i);
}
- assert.match(start, /data-agent="cursor">Cursor<\/button>/);
- assert.match(start, /data-agent="codex">Codex<\/button>/);
- assert.match(start, /data-agent="claude-code">Claude Code<\/button>/);
- assert.match(start, /data-agent="opencode">OpenCode<\/button>/);
- assert.match(start, /data-agent="github-copilot">GitHub Copilot<\/button>/);
+ for (const [id, label] of [
+ ['cursor', 'Cursor'],
+ ['codex', 'Codex'],
+ ['claude-code', 'Claude Code'],
+ ['opencode', 'OpenCode'],
+ ['github-copilot', 'GitHub Copilot'],
+ ]) {
+ assert.match(start, new RegExp(`data-agent="${id}">${label}<\\/button>`));
+ }
assert.match(start, /KNOWN_AGENTS\.has\(requestedAgent\)/);
assert.match(start, /same Skill/);
assert.match(start, /同一份 Skill/);