We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 197caf2 commit 10a06d8Copy full SHA for 10a06d8
packages/vitest/src/integrations/env/utils.ts
@@ -52,6 +52,8 @@ export function populateGlobal(
52
53
const originals = new Map<string | symbol, any>()
54
55
+ const overridenKeys = new Set([...KEYS, ...options.additionalKeys || []])
56
+
57
const overrideObject = new Map<string | symbol, any>()
58
for (const key of keys) {
59
const boundFunction
@@ -60,7 +62,7 @@ export function populateGlobal(
60
62
&& !isClassLikeName(key)
61
63
&& win[key].bind(win)
64
- if (KEYS.includes(key) && key in global) {
65
+ if (overridenKeys.has(key) && key in global) {
66
originals.set(key, global[key])
67
}
68
0 commit comments