1 changed files with 9 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
import test from 'ava'; |
|||
import browserEnv from '../dist'; |
|||
|
|||
test(t => { |
|||
const userAgent = 'Custom user agent'; |
|||
t.is(typeof navigator, 'undefined'); |
|||
browserEnv(['navigator'], { userAgent: userAgent }); |
|||
t.is(navigator.userAgent, userAgent); |
|||
}); |
Loading…
Reference in new issue