Răsfoiți Sursa

test(loader-smoke): normalize /private/tmp temp paths

macOS realpaths temp dirs into /private. The normalizer only stripped
the /private prefix for TMPDIR under /var; a TMPDIR under /tmp (any
explicitly relocated temp root) left one side canonicalized and the
comparison failing. Accept both shapes.
Dudu-0223 1 lună în urmă
părinte
comite
3be7ca8664

+ 2 - 1
packages/support/loader-smoke/tests/loader-smoke.spec.ts

@@ -8,7 +8,8 @@ import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-l
 const configPath = '/tmp/fixture.cordis.yml'
 const tsconfigPath = fileURLToPath(new URL('../../../../tsconfig.json', import.meta.url))
 const fixture = (name: string): string => fileURLToPath(new URL(`./fixtures/${name}.ts`, import.meta.url))
-const canonicalTempPath = (path: string): string => path.replace(/^\/private(?=\/var\/)/, '')
+// macOS realpaths temp dirs into /private; TMPDIR may live under /var or /tmp.
+const canonicalTempPath = (path: string): string => path.replace(/^\/private(?=\/(?:var|tmp)\/)/, '')
 
 describe('runLoaderSmoke', () => {
   it('isolates the process, closes stdin, captures output, and removes the cwd', async () => {