We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad1a7a9 commit 481aab1Copy full SHA for 481aab1
src/env.js
@@ -8,8 +8,10 @@ const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM
8
const IS_NODE = typeof require === 'function' && typeof process !== 'undefined' && typeof process.release !== 'undefined' && process.release.name === 'node' && !IS_ELECTRON
9
// eslint-disable-next-line no-undef
10
const IS_WEBWORKER = typeof importScripts === 'function' && typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope
11
+const IS_TEST = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.NODE_ENV === 'test'
12
13
module.exports = {
14
+ isTest: IS_TEST,
15
isElectron: IS_ELECTRON,
16
isElectronRenderer: IS_ELECTRON_RENDERER,
17
isNode: IS_NODE,
0 commit comments