mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
fix: box alignment in test runner, update metadata counts, add 18 tests
- Fix run-all.js box alignment (hardcoded spaces 1 char short, now using dynamic padEnd) - Update .opencode/index.ts metadata (12→13 agents, 24→31 commands, 16→37 skills) - Add commandExists edge case tests (empty, spaces, path separators, metacharacters) - Add findFiles edge case tests (? wildcard, mtime sorting, maxAge filtering) - Add ensureDir race condition and return value tests - Add runCommand output trimming and failure tests - Add pre-compact session annotation and compaction log timestamp tests - Add check-console-log invalid JSON handling test - Add replaceInFile capture group test - Add readStdinJson Promise type check
This commit is contained in:
@@ -22,9 +22,12 @@ const testFiles = [
|
||||
'scripts/skill-create-output.test.js'
|
||||
];
|
||||
|
||||
console.log('╔══════════════════════════════════════════════════════════╗');
|
||||
console.log('║ Everything Claude Code - Test Suite ║');
|
||||
console.log('╚══════════════════════════════════════════════════════════╝');
|
||||
const BOX_W = 58; // inner width between ║ delimiters
|
||||
const boxLine = (s) => `║${s.padEnd(BOX_W)}║`;
|
||||
|
||||
console.log('╔' + '═'.repeat(BOX_W) + '╗');
|
||||
console.log(boxLine(' Everything Claude Code - Test Suite'));
|
||||
console.log('╚' + '═'.repeat(BOX_W) + '╝');
|
||||
console.log();
|
||||
|
||||
let totalPassed = 0;
|
||||
@@ -71,12 +74,12 @@ for (const testFile of testFiles) {
|
||||
|
||||
totalTests = totalPassed + totalFailed;
|
||||
|
||||
console.log('\n╔══════════════════════════════════════════════════════════╗');
|
||||
console.log('║ Final Results ║');
|
||||
console.log('╠══════════════════════════════════════════════════════════╣');
|
||||
console.log(`║ Total Tests: ${String(totalTests).padStart(4)} ║`);
|
||||
console.log(`║ Passed: ${String(totalPassed).padStart(4)} ✓ ║`);
|
||||
console.log(`║ Failed: ${String(totalFailed).padStart(4)} ${totalFailed > 0 ? '✗' : ' '} ║`);
|
||||
console.log('╚══════════════════════════════════════════════════════════╝');
|
||||
console.log('\n╔' + '═'.repeat(BOX_W) + '╗');
|
||||
console.log(boxLine(' Final Results'));
|
||||
console.log('╠' + '═'.repeat(BOX_W) + '╣');
|
||||
console.log(boxLine(` Total Tests: ${String(totalTests).padStart(4)}`));
|
||||
console.log(boxLine(` Passed: ${String(totalPassed).padStart(4)} ✓`));
|
||||
console.log(boxLine(` Failed: ${String(totalFailed).padStart(4)} ${totalFailed > 0 ? '✗' : ' '}`));
|
||||
console.log('╚' + '═'.repeat(BOX_W) + '╝');
|
||||
|
||||
process.exit(totalFailed > 0 ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user