Skip to content

Commit e182070

Browse files
committed
chore(extension): document the equivalent lstat-symlink mutant
Stryker marks the ConditionalExpression true/false replacements on the dangling-symlink check unobservable: lstat succeeding after a realpath ENOENT can only be a dangling symlink, so the condition is always true at every reachable point. The false replacement is pinned by the dangling-symlink tests; the directive documents the equivalence.
1 parent 7f3668d commit e182070

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/utils/pathUtils.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ async function realPathOfExistingAncestor(filePath: string): Promise<string | nu
8585
// walking to its deepest existing ancestor.
8686
try {
8787
const stat = await fs.promises.lstat(current)
88+
// Stryker disable next-line ConditionalExpression: equivalent - lstat succeeding on an entry whose realpath just failed with ENOENT means the entry is a dangling symlink (a real non-symlink entry would make realpath succeed), so the condition is always true at every reachable point and the true/false replacements are unobservable; the symlink reject is pinned by the dangling-symlink tests
8889
if (stat.isSymbolicLink()) {
8990
return null
9091
}

0 commit comments

Comments
 (0)