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); -});