diff --git a/test/browser-mock.test.js b/test/browser-mock.test.js index f03d8ae..7608969 100644 --- a/test/browser-mock.test.js +++ b/test/browser-mock.test.js @@ -2,10 +2,7 @@ // Only run in Node.js. if (typeof window === 'undefined') { - let assert - (async function () { - assert = (await import('node:assert')).default - })() + const assert = (await import('node:assert')).default describe('Browser-like environment', function () { before(function () { diff --git a/test/react-native.test.js b/test/react-native.test.js index a522552..2e8e3e4 100644 --- a/test/react-native.test.js +++ b/test/react-native.test.js @@ -2,10 +2,7 @@ // Only run in Node.js. if (typeof window === 'undefined') { - let assert - (async function () { - assert = (await import('node:assert')).default - })() + const assert = (await import('node:assert')).default describe('React Native-like environment', function () { before(function () {