Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"darwin" in userAgent does not resolve correctly #481

Open
BrandonALittle opened this issue Jun 15, 2021 · 0 comments
Open

"darwin" in userAgent does not resolve correctly #481

BrandonALittle opened this issue Jun 15, 2021 · 0 comments

Comments

@BrandonALittle
Copy link

Running tests with jest locally:
window.navigator.userAgent of the browser is: Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.5.3

Bowser.parse("Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.5.3") resolves to { browser: { name: 'Safari' }, os: {}, platform: {}, engine: { name: 'Blink' } }

However, in my CircleCI pipeline,:
window.navigator.userAgent of the browser is: Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.5.3

Bowser.parse("Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/16.5.3") resolves to { browser: { name: 'Safari' }, os: { name: 'Linux' }, platform: { type: 'desktop' }, engine: { name: 'Blink' } }

I think Bowser.parse() should be able to handle darwin, but if you think this can be resolved somehow with jsdom, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant