Skip to content

Commit 11c02ee

Browse files
committed
fix(devx): the closure sweep's self-test names its failure instead of crashing
Ablating the sweep predicate (`if (missing.length > 0)` -> `if (false)`) made the self-test exit 1 through a TypeError on `findings[0].missing`, so the named case that had already failed never reached the report. The optional read keeps the exit code and restores the diagnostic. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
1 parent 449f9f0 commit 11c02ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/check-dts-closure.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ function selfTest() {
501501
const m = dualManifest('@fixture/cluster');
502502
eq(
503503
'the sweep reports exactly the paths the shared derivation names',
504-
sweep(redRoot, [{ dir: 'packages/cluster', manifest: m }]).findings[0].missing.map((x) => x.path),
504+
(sweep(redRoot, [{ dir: 'packages/cluster', manifest: m }]).findings[0]?.missing ?? []).map((x) => x.path),
505505
missingDeclarations(declaredDeclarationPaths(m), () => null).map((x) => x.path),
506506
);
507507
eq(

0 commit comments

Comments
 (0)