When using vi.useFakeTimers to fake setTimeout
, 1.2.x throws process is not defined
errors. I think this was introduced in #4441 which standardized to using a isChildProcess helper function instead of various checks against globalThis.__vitest_worker__.isChildProcess
.
npm install
npm run test
Expected: the test passes
Actual: ReferenceError: process is not defined
Note that the first commit in this repo abe06c7 passes when using 1.1.x