Luke Childs
9 years ago
1 changed files with 19 additions and 0 deletions
@ -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…
Reference in new issue