Browse Source

Add test for global properties arg

pull/2/head
Luke Childs 9 years ago
parent
commit
3af72530b3
  1. 19
      test/Function arg should set globals.js

19
test/Function arg should set globals.js

@ -0,0 +1,19 @@
import test from 'ava';
import browserEnv from '../dist';
test(t => {
t.is(typeof window, 'undefined');
t.is(typeof document, 'undefined');
t.is(typeof navigator, 'undefined');
t.is(typeof HTMLElement, 'undefined');
browserEnv([]);
t.is(typeof window, 'undefined');
t.is(typeof document, 'undefined');
t.is(typeof navigator, 'undefined');
t.is(typeof HTMLElement, 'undefined');
browserEnv(['navigator', 'HTMLElement']);
t.is(typeof window, 'undefined');
t.is(typeof document, 'undefined');
t.not(typeof navigator, 'undefined');
t.not(typeof HTMLElement, 'undefined');
});
Loading…
Cancel
Save