Browse Source

Run tests in seperate processes so globals don't interfere

pull/2/head
Luke Childs 9 years ago
parent
commit
e9773b54eb
  1. 7
      test/Function should return window instance.js
  2. 7
      test/Function should setup browser environment.js

7
test/Function should return window instance.js

@ -0,0 +1,7 @@
import test from 'ava';
import browserEnv from '../dist';
test(t => {
const returnValue = browserEnv();
t.is(returnValue, window);
});

7
test/unit.js → test/Function should setup browser environment.js

@ -1,7 +1,7 @@
import test from 'ava';
import browserEnv from '../dist';
test('Function should setup browser environment', t => {
test(t => {
t.is(typeof window, 'undefined');
t.is(typeof document, 'undefined');
t.is(typeof navigator, 'undefined');
@ -12,8 +12,3 @@ test('Function should setup browser environment', t => {
t.not(typeof navigator, 'undefined');
t.not(typeof HTMLElement, 'undefined');
});
test('Function should return window instance', t => {
const returnValue = browserEnv();
t.is(returnValue, window);
});
Loading…
Cancel
Save