Skip to content

Commit e3ba148

Browse files
raju-opticlaude
andauthored
[FSSDK-12879] Remove Karma testing infrastructure (#1162)
* Remove Karma testing infrastructure Karma config files, scripts, and devDependencies are no longer used. Remove them along with the README reference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9884d73 commit e3ba148

8 files changed

Lines changed: 66 additions & 1582 deletions

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ This system is enforced at build time through ESLint rules and validation script
221221

222222
### Unit Tests
223223

224-
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.
224+
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.
225225

226226
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.
227227

@@ -231,8 +231,8 @@ To run unit tests, you can take the following steps:
231231
2. Run `npm test` to run all test files.
232232
3. Run `npm run test-vitest` to run only tests written using Vitest.
233233
4. Run `npm run test-mocha` to run only tests written using Mocha.
234-
4. (For cross-browser testing) Run `npm run test-xbrowser` to run tests in many browsers via BrowserStack.
235-
5. Resolve any tests that fail before continuing with your contribution.
234+
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.
235+
6. Resolve any tests that fail before continuing with your contribution.
236236

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

@@ -243,14 +243,20 @@ npm install
243243
# Run unit tests.
244244
npm test
245245

246-
# Run unit tests in many browsers, currently via BrowserStack.
246+
# Run browser tests locally.
247+
npm run test-browser-local
248+
249+
# Run browser tests via BrowserStack.
247250
# For this to work, the following environment variables must be set:
248-
# - BROWSER_STACK_USERNAME
249-
# - BROWSER_STACK_PASSWORD
250-
npm run test-xbrowser
251+
# - BROWSERSTACK_USERNAME
252+
# - BROWSERSTACK_ACCESS_KEY
253+
npm run test-browser-browserstack
254+
255+
# Run UMD bundle tests via BrowserStack.
256+
npm run test-umd-browserstack
251257
```
252258

253-
[/.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/).
259+
[/.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/).
254260

255261
### Contributing
256262

karma.base.conf.js

Lines changed: 0 additions & 136 deletions
This file was deleted.

karma.bs.conf.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

karma.local_chrome.bs.conf.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

karma.local_chrome.umd.conf.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

karma.umd.conf.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)