mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 11:22:25 +00:00
feat(test-audit): run daily test audit and fix zero-assertion test
- Run daily test audit using `test-audit-agent`. - Generate `test-audit-report-2026-02-15.md` with coverage and static analysis findings. - Fix zero-assertion test in `tests/minimal-channel-profile.test.mjs`. - Add audit scripts `scripts/agent/audit-coverage-map.js` and `scripts/agent/audit-static-analysis.sh`. - Log execution details in `test_logs/TEST_LOG_2026-02-15_20-00-00.md`. - Create completion log in `docs/agents/task-logs/daily/`. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
893765d8e3
commit
50ded6b4dc
11 files changed
+435
-3
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const criticalFiles = [
|
||||
'js/services/authService.js',
|
||||
'js/relayManager.js',
|
||||
'js/nostr/dmDecryptWorker.js',
|
||||
'js/nostr/dmDecryptWorkerClient.js',
|
||||
'js/nostr/watchHistory.js',
|
||||
'js/userBlocks.js',
|
||||
'js/ui/ambientBackground.js',
|
||||
'torrent/app.js'
|
||||
];
|
||||
|
||||
try {
|
||||
const summary = JSON.parse(fs.readFileSync('test-audit/coverage/coverage-summary.json', 'utf8'));
|
||||
const report = {};
|
||||
|
||||
for (const file of criticalFiles) {
|
||||
// Find the file in the coverage summary keys (might be absolute paths)
|
||||
const key = Object.keys(summary).find(k => k.endsWith(file));
|
||||
if (key) {
|
||||
report[file] = summary[key].lines.pct;
|
||||
} else {
|
||||
report[file] = 0; // Not covered
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Critical Coverage Report:");
|
||||
console.log(JSON.stringify(report, null, 2));
|
||||
|
||||
fs.writeFileSync('test-audit/coverage-gaps.json', JSON.stringify(report, null, 2));
|
||||
} catch (e) {
|
||||
console.error("Error processing coverage summary:", e);
|
||||
}
|
||||
Reference in new issue
Block a user