Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/vitest/src/integrations/env/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export function populateGlobal(

const originals = new Map<string | symbol, any>()

const overridenKeys = new Set([...KEYS, ...options.additionalKeys || []])

const overrideObject = new Map<string | symbol, any>()
for (const key of keys) {
const boundFunction
Expand All @@ -60,7 +62,7 @@ export function populateGlobal(
&& !isClassLikeName(key)
&& win[key].bind(win)

if (KEYS.includes(key) && key in global) {
if (overridenKeys.has(key) && key in global) {
originals.set(key, global[key])
}

Expand Down
Loading