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.
This commit is contained in:
Dudu-0223
2026-08-02 04:34:15 +08:00
committed by imccyu
parent 99a778d63f
commit 3be7ca8664
@@ -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 () => {