Browse Source

Add tests for unordered args

pull/2/head
Luke Childs 9 years ago
parent
commit
ec3775ba20
  1. 10
      test/Arguments should be able to be passed in in either order.js

10
test/Arguments should be able to be passed in in either order.js

@ -0,0 +1,10 @@
import test from 'ava';
import browserEnv from '../dist';
test(t => {
t.is(typeof navigator, 'undefined');
const returnValue = browserEnv(['navigator'], { userAgent: 'first' });
t.is(navigator.userAgent, 'first');
const secondReturnValue = browserEnv({ userAgent: 'second' }, ['navigator']);
t.is(navigator.userAgent, 'second');
});
Loading…
Cancel
Save