Repository navigation
Commit b328ded
committed
test(u5b): scope the injected stat to the row that installs it
vi.restoreAllMocks() in afterEach restores spies; it does not clear an implementation set
on the fs/promises factory mocks, so the double installed by the leftover-stat rows stayed
in place for the rest of the file. Keyed on the literal backup path that was inert, because
beforeEach mkdtemps a fresh directory per test and the captured path cannot recur. Keyed on
dev+ino it fires again as soon as the operating system hands a later test's unrelated file
the inode an earlier row captured - measured on the hosted ubuntu leg, where six unrelated
rows in this file failed and the three leftover rows passed. Five of the six carry this
injection's fingerprint; the 0o600 row is skipIf(win32) and so has no local oracle.
Restore the previous implementation in a finally, and name in the test what the matcher is
keyed on and for how long it lives.1 parent 5841dd2 commit b328ded
1 file changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
676 | 681 | | |
677 | 682 | | |
678 | 683 | | |
| |||
681 | 686 | | |
682 | 687 | | |
683 | 688 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
692 | 701 | | |
693 | 702 | | |
694 | 703 | | |
| |||
0 commit comments