Browse Source

Add test for overwrite arg

pull/2/head
Luke Childs 9 years ago
parent
commit
f49fcf55b6
  1. 12
      test/Function overwrite arg should overwrite existing globals.js
  2. 0
      test/Function props arg should set globals.js

12
test/Function overwrite arg should overwrite existing globals.js

@ -0,0 +1,12 @@
import test from 'ava';
import browserEnv from '../dist';
test(t => {
t.is(typeof window, 'undefined');
let returnValue = browserEnv();
t.is(returnValue, window);
returnValue = browserEnv();
t.not(returnValue, window);
returnValue = browserEnv(['window'], true);
t.is(returnValue, window);
});

0
test/Function arg should set globals.js → test/Function props arg should set globals.js

Loading…
Cancel
Save