Skip to content

Commit 989681c

Browse files
author
Shane Osbourne
committed
trying globalThis
1 parent 0ebd3d9 commit 989681c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

integration-test/playwright/windows-permissions.spec.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,20 @@ test('Windows Permissions Usage', async ({ page }) => {
77
await page.addInitScript(() => {
88
// @ts-expect-error - testing
99
if (typeof Bluetooth === 'undefined') {
10-
// @ts-expect-error - testing
11-
window.Bluetooth = { requestDevice: async () => { /* noop */ } }
10+
globalThis.Bluetooth = { requestDevice: async () => { /* noop */ } }
1211
}
1312
// @ts-expect-error - testing
1413
if (typeof USB === 'undefined') {
15-
// @ts-expect-error - testing
16-
window.USB = { requestDevice: async () => { /* noop */ } }
14+
globalThis.USB = { requestDevice: async () => { /* noop */ } }
1715
}
1816

1917
// @ts-expect-error - testing
2018
if (typeof Serial === 'undefined') {
21-
// @ts-expect-error - testing
22-
window.Serial = { requestPort: async () => { /* noop */ } }
19+
globalThis.Serial = { requestPort: async () => { /* noop */ } }
2320
}
2421
// @ts-expect-error - testing
2522
if (typeof HID === 'undefined') {
26-
// @ts-expect-error - testing
27-
window.HID = { requestDevice: async () => { /* noop */ } }
23+
globalThis.HID = { requestDevice: async () => { /* noop */ } }
2824
}
2925
})
3026
await perms.enabled()

0 commit comments

Comments
 (0)