Skip to content

Commit f82cd8b

Browse files
committed
test: update readme consistency tests and suppress verbose unit test output
1 parent 4750e49 commit f82cd8b

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

tests/unit/readme-docs-consistency.test.mjs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ function readProjectFile(relativePath) {
1111
return fs.readFileSync(path.join(projectRoot, relativePath), 'utf8');
1212
}
1313

14-
test('README OpenClaw state diagram includes the documented runtime config file', () => {
14+
test('README Architecture diagram includes the documented config files', () => {
1515
const readme = readProjectFile('README.md');
1616
const readmeZh = readProjectFile('README.zh.md');
17-
assert.match(
18-
readme,
19-
/OPENCLAW\["~\/\.openclaw\/\*\.json5 \+ ~\/\.openclaw\/openclaw\.json \+ workspace\/AGENTS\.md"\]/
20-
);
21-
assert.match(
22-
readmeZh,
23-
/OPENCLAW\["~\/\.openclaw\/\*\.json5 \+ ~\/\.openclaw\/openclaw\.json \+ workspace\/AGENTS\.md"\]/
24-
);
17+
18+
// 验证 README.md 中的架构图节点
19+
assert.match(readme, /ClawDir\[~\/\.openclaw\]/);
20+
assert.match(readme, /ClaudeDir\[~\/\.claude\]/);
21+
assert.match(readme, /CodexDir\[~\/\.codex\]/);
22+
23+
// 验证 README.zh.md 中的架构图节点
24+
assert.match(readmeZh, /ClawDir\[~\/\.openclaw\]/);
25+
assert.match(readmeZh, /ClaudeDir\[~\/\.claude\]/);
26+
assert.match(readmeZh, /CodexDir\[~\/\.codex\]/);
2527
});

tests/unit/run.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ let failures = 0;
6363
for (const { name, fn } of tests) {
6464
try {
6565
await fn();
66-
console.log(`\u2713 ${name}`);
66+
// console.log(`\u2713 ${name}`);
6767
} catch (err) {
6868
failures += 1;
6969
console.error(`\u2717 ${name}`);

0 commit comments

Comments
 (0)