express-useragent icon indicating copy to clipboard operation
express-useragent copied to clipboard

Inconsistent results for `isDesktop` with jsdom

Open justinanastos opened this issue 5 years ago • 0 comments

When using jsdom, the host's architecture is reported. On the mac:

Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0

On Linux (CI):

Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0

isMac does not comprehend darwin as being a Mac and, therefore, does not report it as isDesktop. When running on CircleCI with Linux, this will report isLinux: true, triggering isDesktop: true.


I propose that isMac also check for darwin. If you're ok with this, I'll happily open a PR :)

justinanastos avatar Mar 01 '19 19:03 justinanastos