test(ptc): keep process identity diagnostics free of environment data
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user