Commit 2bc4872
committed
test(stack): couple negative live assertions to internal controls
An assertion of absence proves nothing unless something in the same test
shows the row was reachable to begin with. A sibling `it` does not couple
them: vitest runs on past a failure, so the control can go red while the
negative test stays green in the same run.
beforeAll already throws on a failed seed, so an unseeded fixture is not
the live risk. The risk it cannot catch is an operator that silently
matches nothing — a constant-false predicate, or encryption no-op'ing —
which produces exactly the empty result each negative test asserts.
- operators-live-pg: fold the intersecting `and` pair into the disjoint
block, so [] cannot pass via a constant-false `and`. Add a present-needle
control to the `contains` no-match block, whose only proof that contains
can match lived in a sibling test.
- operators-lock-context-live-pg: assert the same eq WITH the lock context
finds ROW_A before asserting it is unreachable without one.
- matrix-live-pg: two-sample domains (date, timestamp) have an empty strict
interior, so `gt`/`lt` were unproven there. Add one-sided bounds, which
are non-empty for every domain.
- operators-null-live-pg: guard the [row] destructure so a missing fixture
reads as a missing fixture, not a null-handling bug.
Found by audit while triaging CodeRabbit's decrypt-denial comment on #607;
same defect class, sites it did not reach.1 parent 14d0e78 commit 2bc4872
4 files changed
Lines changed: 69 additions & 14 deletions
File tree
- packages/stack/__tests__
- drizzle-v3
- v3-matrix
Lines changed: 25 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
604 | 613 | | |
605 | 614 | | |
606 | 615 | | |
| |||
661 | 670 | | |
662 | 671 | | |
663 | 672 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
673 | 681 | | |
| 682 | + | |
674 | 683 | | |
675 | | - | |
676 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
677 | 690 | | |
678 | 691 | | |
679 | 692 | | |
680 | 693 | | |
681 | 694 | | |
682 | | - | |
| 695 | + | |
683 | 696 | | |
684 | 697 | | |
685 | 698 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
261 | 271 | | |
262 | 272 | | |
263 | 273 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
553 | 582 | | |
554 | 583 | | |
555 | 584 | | |
| |||
0 commit comments