Commit a22880b5 authored by Robert Knight's avatar Robert Knight

Convert `global` references to `globalThis`

`globalThis` is the preferred way of accessing the global object
regardless of environment. It also works in eg. Rollup whereas `global`
does not.
parent 2a165fe9
...@@ -25,7 +25,7 @@ describe('websocket wrapper', () => { ...@@ -25,7 +25,7 @@ describe('websocket wrapper', () => {
const WebSocket = window.WebSocket; const WebSocket = window.WebSocket;
beforeEach(() => { beforeEach(() => {
global.WebSocket = FakeWebSocket; globalThis.WebSocket = FakeWebSocket;
clock = sinon.useFakeTimers(); clock = sinon.useFakeTimers();
connectionCount = 0; connectionCount = 0;
...@@ -36,7 +36,7 @@ describe('websocket wrapper', () => { ...@@ -36,7 +36,7 @@ describe('websocket wrapper', () => {
}); });
afterEach(() => { afterEach(() => {
global.WebSocket = WebSocket; globalThis.WebSocket = WebSocket;
clock.restore(); clock.restore();
console.warn.restore(); console.warn.restore();
console.error.restore(); console.error.restore();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment