Remove core env overriding in worker TestConfiguration. Should be split out in server, too.

This commit is contained in:
Sam Rose 2023-12-11 17:28:33 +00:00
parent 867d68d429
commit 779bd8f230
No known key found for this signature in database
1 changed files with 0 additions and 6 deletions

View File

@ -256,22 +256,16 @@ class TestConfiguration {
*/
setEnv(newEnvVars: Partial<typeof env>): () => void {
const oldEnv = cloneDeep(env)
const oldCoreEnv = cloneDeep(coreEnv)
let key: keyof typeof newEnvVars
for (key in newEnvVars) {
env._set(key, newEnvVars[key])
coreEnv._set(key, newEnvVars[key])
}
return () => {
for (const [key, value] of Object.entries(oldEnv)) {
env._set(key, value)
}
for (const [key, value] of Object.entries(oldCoreEnv)) {
coreEnv._set(key, value)
}
}
}