Skip to content

Commit

Permalink
Documentation link
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Mar 6, 2024
1 parent c55d429 commit f74d36b
Showing 1 changed file with 2 additions and 63 deletions.
65 changes: 2 additions & 63 deletions packages/vitest-provider-browserstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,70 +18,9 @@ npm i @chialab/vitest-provider-browserstack -D
yarn add @chialab/vitest-provider-browserstack -D
```

## Usage
## Documentation

In order to use this provider, you need to have a Browserstack account and a valid access key.

Use this module as provider for Vitest browser runner:

```ts
/// <reference types="@chialab/vitest-provider-browserstack" />

export default {
test: {
browser: {
name: 'browserstack:chrome-latest',
// Use the browserstack provider.
provider: '@chialab/vitest-provider-browserstack',
// We need to expose the server to the network in order to let Browserstack access it.
api: {
host: '0.0.0.0',
port: 5176,
},
// Hijack ESM imports is unstable on older browsers.
slowHijackESM: false,
},
},
browserstack: {
options: {
user: 'YOUR_BROWSERSTACK_USERNAME',
key: 'YOUR_BROWSERSTACK_ACCESS_KEY',
},
capabilities: {
'chrome-latest': {
'browserName': 'Chrome',
'bstack:options': {
browserVersion: 'latest',
},
},
'firefox-latest': {
'browserName': 'Firefox',
'bstack:options': {
browserVersion: 'latest',
},
},
'safari-latest': {
'browserName': 'Safari',
'bstack:options': {
browserVersion: 'latest',
},
},
'edge-latest': {
'browserName': 'MicrosoftEdge',
'bstack:options': {
browserVersion: 'latest',
},
},
},
},
};
```

## Options

`user` and `key` options can be omitted if you have a `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` environment variables set.

Read more about the capabilities configuration at [Browserstack documentation](https://www.browserstack.com/docs/automate/capabilities) and Webdriverio [capabilities](https://webdriver.io/docs/capabilities/).
Read the documentation at [chialab.github.io/rna](https://chialab.github.io/rna/guide/vitest-provider-browserstack).

---

Expand Down

0 comments on commit f74d36b

Please sign in to comment.