mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 22:02:54 +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,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
OUTPUT="test-audit/suspicious-tests.txt"
|
||||
echo "Suspicious Tests Report" > "$OUTPUT"
|
||||
echo "=======================" >> "$OUTPUT"
|
||||
|
||||
echo "" >> "$OUTPUT"
|
||||
echo "## Tests with zero assertions (heuristic)" >> "$OUTPUT"
|
||||
# Find test files
|
||||
find tests -name "*.test.mjs" -o -name "*.test.js" | while read f; do
|
||||
if ! grep -qE "assert\.|expect\(|t\.is" "$f"; then
|
||||
echo " - $f" >> "$OUTPUT"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "" >> "$OUTPUT"
|
||||
echo "## Tests using .only or .skip" >> "$OUTPUT"
|
||||
grep -rE "\.(only|skip)\(" tests >> "$OUTPUT"
|
||||
|
||||
echo "" >> "$OUTPUT"
|
||||
echo "## Tests using setTimeout/sleep" >> "$OUTPUT"
|
||||
grep -rE "setTimeout\(|sleep\(|await delay\(" tests >> "$OUTPUT"
|
||||
|
||||
echo "" >> "$OUTPUT"
|
||||
echo "## Tests using console logs" >> "$OUTPUT"
|
||||
grep -rE "console\.(log|warn|error)" tests >> "$OUTPUT"
|
||||
|
||||
echo "" >> "$OUTPUT"
|
||||
echo "## Tests using real network (fetch/axios/WebSocket)" >> "$OUTPUT"
|
||||
grep -rE "fetch\(|axios\.|new WebSocket" tests >> "$OUTPUT"
|
||||
Reference in new issue
Block a user