Skip to content

Commit cbe133d

Browse files
committedSep 29, 2023
fix: overwrite global URL with environment's (#4164)
1 parent 859d236 commit cbe133d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

Diff for: ‎packages/vitest/src/integrations/env/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const skipKeys = [
55
'self',
66
'top',
77
'parent',
8-
'URL',
98
]
109

1110
export function getWindowKeys(global: any, win: any) {

Diff for: ‎test/core/test/environments/node.spec.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @vitest-environment node
2+
3+
import { expect, test } from 'vitest'
4+
5+
const nodeMajor = Number(process.version.slice(1).split('.')[0])
6+
7+
test.runIf(nodeMajor > 16)('url correctly creates an object', () => {
8+
expect(() => {
9+
URL.createObjectURL(new Blob([]))
10+
}).not.toThrow()
11+
})

0 commit comments

Comments
 (0)