You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Detect [Happy DOM](https://github.com/capricorn86/happy-dom) and [JSDOM](https://github.com/jsdom/jsdom) when using test environments like [Vitest](https://github.com/vitest-dev/vitest) (check the [test](https://github.com/userquin/detect-browser-es/tree/main/test) folder).
42
+
- Detect [WebDriverIO](https://github.com/webdriverio/webdriverio) when using WebDriverIO tests or test environments like [Vitest](https://github.com/vitest-dev/vitest).
42
43
- ServerInfo via [std-env](https://github.com/unjs/std-env) with [provider](https://github.com/unjs/std-env#provider-detection) and [runtime](https://github.com/unjs/std-env#runtime-detection) detection.
43
44
45
+
## Testing
46
+
47
+
To run the tests, from root folder run `nr test`, the script will run:
48
+
- the original tests from `detect-browser`
49
+
- Happy DOM and JSDOM tests, except WebDriverIO detection
50
+
51
+
To test WebDriverIO detection, run one of the following commands (requires Vitest v1.0.0-beta.2, not yet released, tests will not work):
52
+
-`nr wdio-chrome`: Chrome must be installed
53
+
-`nr wdio-edge`: Edge must be installed
54
+
-`nr wdio-firefox`: Firefox must be installed
55
+
-`nr wdio-safari`: Safari must be installed and only on macOS machine.
0 commit comments