From e9773b54ebbedfb7e48ce189d359ff27f692b316 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 25 May 2016 23:14:21 +0100 Subject: [PATCH] Run tests in seperate processes so globals don't interfere --- test/Function should return window instance.js | 7 +++++++ ...nit.js => Function should setup browser environment.js} | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 test/Function should return window instance.js rename test/{unit.js => Function should setup browser environment.js} (68%) diff --git a/test/Function should return window instance.js b/test/Function should return window instance.js new file mode 100644 index 0000000..21005f3 --- /dev/null +++ b/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); +}); diff --git a/test/unit.js b/test/Function should setup browser environment.js similarity index 68% rename from test/unit.js rename to test/Function should setup browser environment.js index 95d6b00..48da2c7 100644 --- a/test/unit.js +++ b/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); -});