Skip to content

Commit

Permalink
refactor: use globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 committed Oct 7, 2024
1 parent d6aee79 commit 1f6169b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/setup-files/setup.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const path = require('path')

global.SETUP_CJS = path.basename(__filename) // using some cjs stuff here to make sure it works
globalThis.SETUP_CJS = path.basename(__filename) // using some cjs stuff here to make sure it works
2 changes: 1 addition & 1 deletion tests/setup-files/setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import path from 'path'

global.SETUP_JS_MODULE = path.basename(import.meta.url)
globalThis.SETUP_JS_MODULE = path.basename(import.meta.url)
2 changes: 1 addition & 1 deletion tests/setup-files/setup.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import path from 'path'

global.SETUP_MJS = path.basename(import.meta.url)
globalThis.SETUP_MJS = path.basename(import.meta.url)

0 comments on commit 1f6169b

Please sign in to comment.