소스 검색

test(spill-local): exclude POSIX identity branches on Windows

Dudu-0223 1 개월 전
부모
커밋
d6f9931c4b
1개의 변경된 파일과 6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      packages/spill/spill-local/src/cleanup.ts

+ 6 - 0
packages/spill/spill-local/src/cleanup.ts

@@ -48,14 +48,20 @@ function isTrustedDirectory(stats: Stats): boolean {
   if (!stats.isDirectory()) return false
   /* v8 ignore next -- POSIX ownership and mode bits have no Windows equivalent. */
   if (process.platform === 'win32' || process.geteuid === undefined) return true
+  /* v8 ignore start -- Windows takes the return above; POSIX tests exercise
+     owner and mode rejection. */
   return stats.uid === process.geteuid() && (stats.mode & 0o022) === 0
+  /* v8 ignore stop */
 }
 
 /** Stable identity for de-duplicating aliases of one root. */
 function rootIdentity(path: string, stats: Stats): string {
   /* v8 ignore next -- Windows file indexes are not portable inode identities. */
   if (process.platform === 'win32') return path.toLowerCase()
+  /* v8 ignore start -- Windows uses the canonical path identity above; POSIX
+     tests exercise device and inode identity. */
   return `${String(stats.dev)}:${String(stats.ino)}`
+  /* v8 ignore stop */
 }
 
 /**