Skip to content

Commit 69e09e2

Browse files
committed
test(devx): make the no-type-entry stale case exercise the guard it names
Mutation testing found this case green against a staleClosure with its type-entry guard deleted: the node described `built: false`, so the built guard alone carried it and the label was describing an assertion that was not being made. Describe it as built -- a shape the fs read cannot produce, which is the point, since the pure function's contract is total. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KNfj35pXRxnF1D3gZN5zjc
1 parent 866f416 commit 69e09e2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/check-type-check-coverage.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,9 +2673,15 @@ function selfTest() {
26732673
expect: ['ledgered'],
26742674
},
26752675
{
2676-
label: 'a package that declares no type entry point is never stale',
2676+
// Described as BUILT on purpose, which the fs read cannot currently
2677+
// produce (`built` is "some declared entry exists", so no entries means
2678+
// not built). Written the other way the case passes on the `built` guard
2679+
// alone and pins nothing about type entries -- measured: deleting the
2680+
// type-entry guard left the whole table green until this node said
2681+
// `built: true`.
2682+
label: 'a package that declares no type entry point is never stale, however it is described',
26772683
roots: ['ledgered'],
2678-
graph: new Map([['ledgered', fresh(['console'])], ['console', { deps: [], typeEntries: [], built: false, stale: true }]]),
2684+
graph: new Map([['ledgered', fresh(['console'])], ['console', { deps: [], typeEntries: [], built: true, stale: true }]]),
26792685
expect: [],
26802686
},
26812687
{

0 commit comments

Comments
 (0)