Skip to content

Commit d736cef

Browse files
zigomirlukeed
andauthored
fix(uvu): stricter isNode check (#63)
* Stricter isNode check * fix: include `process.stdout` for `isNode` check related: lukeed/kleur#42 Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
1 parent 0f9dfb7 commit d736cef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const context = (state) => ({ tests:[], before:[], after:[], bEach:[], aEach:[],
1010
const milli = arr => (arr[0]*1e3 + arr[1]/1e6).toFixed(2) + 'ms';
1111
const hook = (ctx, key) => handler => ctx[key].push(handler);
1212

13-
if (isNode = typeof process !== 'undefined') {
13+
if (isNode = typeof process < 'u' && typeof process.stdout < 'u') {
1414
// globalThis polyfill; Node < 12
1515
if (typeof globalThis !== 'object') {
1616
Object.defineProperty(global, 'globalThis', {

0 commit comments

Comments
 (0)