Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ This system is enforced at build time through ESLint rules and validation script

### Unit Tests

There is a mix of testing paradigms used within the JavaScript SDK which include Mocha, Chai, Karma, and Vitest, indicated by their respective `*.tests.js` and `*.spec.ts` filenames.
There is a mix of testing paradigms used within the JavaScript SDK which include Mocha, Chai, and Vitest, indicated by their respective `*.tests.js` and `*.spec.ts` filenames.

When contributing code to the SDK, aim to keep the percentage of code test coverage at the current level ([![Coveralls](https://img.shields.io/coveralls/optimizely/javascript-sdk.svg)](https://coveralls.io/github/optimizely/javascript-sdk)) or above.

Expand All @@ -231,8 +231,8 @@ To run unit tests, you can take the following steps:
2. Run `npm test` to run all test files.
3. Run `npm run test-vitest` to run only tests written using Vitest.
4. Run `npm run test-mocha` to run only tests written using Mocha.
4. (For cross-browser testing) Run `npm run test-xbrowser` to run tests in many browsers via BrowserStack.
5. Resolve any tests that fail before continuing with your contribution.
5. (For cross-browser testing) Run `npm run test-browser-browserstack` to run browser tests via BrowserStack, or `npm run test-browser-local` to run them locally.
6. Resolve any tests that fail before continuing with your contribution.

This information is relevant only if you plan on contributing to the SDK itself.

Expand All @@ -243,14 +243,20 @@ npm install
# Run unit tests.
npm test

# Run unit tests in many browsers, currently via BrowserStack.
# Run browser tests locally.
npm run test-browser-local

# Run browser tests via BrowserStack.
# For this to work, the following environment variables must be set:
# - BROWSER_STACK_USERNAME
# - BROWSER_STACK_PASSWORD
npm run test-xbrowser
# - BROWSERSTACK_USERNAME
# - BROWSERSTACK_ACCESS_KEY
npm run test-browser-browserstack

# Run UMD bundle tests via BrowserStack.
npm run test-umd-browserstack
```

[/.github/workflows/javascript.yml](/.github/workflows/javascript.yml) contains the definitions for `BROWSER_STACK_USERNAME` and `BROWSER_STACK_ACCESS_KEY` used in the GitHub Actions CI pipeline. When developing locally, you must provide your own credentials in order to run `npm run test-xbrowser`. You can register for an account for free on [the BrowserStack official website here](https://www.browserstack.com/).
[/.github/workflows/javascript.yml](/.github/workflows/javascript.yml) contains the definitions for `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` used in the GitHub Actions CI pipeline. When developing locally, you must provide your own credentials in order to run `npm run test-browser-browserstack`. You can register for an account for free on [the BrowserStack official website here](https://www.browserstack.com/).

### Contributing

Expand Down
136 changes: 0 additions & 136 deletions karma.base.conf.js

This file was deleted.

34 changes: 0 additions & 34 deletions karma.bs.conf.js

This file was deleted.

29 changes: 0 additions & 29 deletions karma.local_chrome.bs.conf.js

This file was deleted.

30 changes: 0 additions & 30 deletions karma.local_chrome.umd.conf.js

This file was deleted.

35 changes: 0 additions & 35 deletions karma.umd.conf.js

This file was deleted.

Loading
Loading