Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nwalters512 committed Aug 20, 2021
1 parent 2a48a5f commit ac0610f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ describe('JSDomEnvironment', () => {

expect(env.fakeTimersModern).toBeDefined();
});

it('should respect userAgent option', () => {
const env = new JSDomEnvironment(makeProjectConfig({
testEnvironmentOptions: {
userAgent: 'foo',
},
}));

expect(env.dom.window.navigator.userAgent).toEqual('foo');
});
});

0 comments on commit ac0610f

Please sign in to comment.