mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 23:26:39 +03:00
Reject empty collection coverage
AI assistance: Codex validated and addressed the Greptile empty-collection review finding with focused regression coverage.
This commit is contained in:
@@ -122,7 +122,10 @@ function hasCoverageValue(value) {
|
||||
if (value && typeof value === 'object') {
|
||||
return Object.values(value).some(hasCoverageValue);
|
||||
}
|
||||
if (typeof value === 'string') return value.trim().length > 0;
|
||||
if (typeof value === 'string') {
|
||||
const trimmed = value.trim();
|
||||
return trimmed.length > 0 && !/^(?:\[\s*\]|\{\s*\})$/.test(trimmed);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user