You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a6ce54e
Browse filesBrowse the repository at this point in the historyBrowse files
test(file-safety): kill the three options-guard mutants with platform-pinned specs
The changed-code sweep left three survivors on 1910 that a spec change can close:
safeWriteText.ts:402 reads options?.onWarning, and :572 and :692 read options?.execFileRunner.
The mutated form differs from the clean one only when the options object is absent, so the
documented platform override cannot trip these chains: passing { platform: "win32" } is what
makes options non-null, and non-null options is the case the chain already handles. Two tests
therefore call safeWriteText with no options at all and pin process.platform for the duration
of the call, restoring its own descriptor afterwards, so the win32 DACL steps run the same way
on a Linux runner as on Windows instead of being gated on the host. The third test keeps the
override form and pins the icacls save-then-restore ordering that the OS-gated test at line 752
could not assert off a Windows host; it kills none of the three mutants, and that gap is
reported in the test comment rather than papered over with a weaker assertion.
Arm evidence, each mutant written over the shipped source, the suite run against it, then the
source restored and hash-compared:
402 sha256-16 8e91f5e89c64731c 1 failed, 125 passed - fails the default-sink warning test
572 sha256-16 7adb6c41be7b21f2 3 failed, 123 passed - also fails the shipped no-options
test and the save/restore ordering test
692 sha256-16 f4b9b9c332cce6ee 3 failed, 123 passed - the same two tests
Suite 123 -> 126 tests, exit code 0. Shipped source unchanged: safeWriteText.ts 37,164 bytes
fb308ea2d1a62b44. No Stryker directive added, no suppressions touched, no changeset.
0 commit comments