Closed aduh95 closed 7 months ago
It seems better to use throw away objects rather modifying the parent env, as it makes it less likely that we forget to remove a key that could end up affecting other tests.
@nodejs/corepack any opinions on this? I'd rather not spend time on fixing the conflicts if I'm the only one in support for this change.
The goal makes sense but I would rather use a beforeEach and afterEeach hook in a setupFile to do it.
beforeEach
afterEeach
setupFile
Clone process.env in the beforeEach hook and restore it again in afterEach.
process.env
afterEach
It seems better to use throw away objects rather modifying the parent env, as it makes it less likely that we forget to remove a key that could end up affecting other tests.