Skip to content

Commit

Permalink
use globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Jun 15, 2024
1 parent faa1c63 commit e7fe827
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/indexedDB.clear.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.clear');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.didExpire.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.didExpire');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.entries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.entries');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.getItem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.getItem');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.hasItem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.hasItem');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.key.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.key');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.keys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.keys');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.length.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.length');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.removeItem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.length');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.setItem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.setItem');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down
2 changes: 1 addition & 1 deletion tests/indexedDB.values.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import browserEnv from 'browser-env';
const test = suite('indexedDB.values');

browserEnv(['window']);
global['navigator'] = new Navigator();
globalThis['navigator'] = new Navigator();
window.indexedDB = {}

const db = new PorridgeDB();
Expand Down

0 comments on commit e7fe827

Please sign in to comment.