test(ptc): keep process identity diagnostics free of environment data

This commit is contained in:
creatixchu committed 2026-09-25 12:43:09 +08:00
1 parent 9d6a9e28b5
commit 0b26294635
1 file changed
+3 -3
@@ -47,11 +47,11 @@ it('keeps an injected process local to the REPL while it runs and after it close
const descriptor = Object.getOwnPropertyDescriptor(globalThis, 'process')!
try {
const h = await setup()
expect(globalThis.process).toBe(hostProcess)
expect(globalThis.process === hostProcess).toBe(true)
expect(decodePtcJsonWire((await h.run('Object.keys(process.env)')).value)).toEqual([])
expect(globalThis.process).toBe(hostProcess)
expect(globalThis.process === hostProcess).toBe(true)
await h.close()
expect(globalThis.process).toBe(hostProcess)
expect(globalThis.process === hostProcess).toBe(true)
} finally {
Object.defineProperty(globalThis, 'process', descriptor)
}