Files
open-wc/packages/testing-karma-bs
CircleCI 5b4f2a97c1 chore: release new versions
- @open-wc/building-rollup@0.1.1
 - @open-wc/building-webpack@0.1.10
 - @open-wc/chai-dom-equals@0.9.23
 - @open-wc/create@0.1.0
 - @open-wc/demoing-storybook@0.1.1
 - @open-wc/eslint-config@0.4.1
 - @open-wc/prettier-config@0.1.8
 - @open-wc/semantic-dom-diff@0.7.14
 - @open-wc/testing-helpers@0.7.22
 - @open-wc/testing-karma-bs@0.2.15
 - @open-wc/testing-karma@0.4.14
 - @open-wc/testing-wallaby@0.1.11
 - @open-wc/testing@0.9.25
 - @open-wc/webpack-import-meta-loader@0.1.3
2019-03-08 23:28:54 +00:00
..
2019-03-08 23:28:54 +00:00
2019-03-08 23:28:54 +00:00
2019-03-08 22:56:59 +01:00

Testing via Browserstack

This will run your local test via Browserstack browsers/devices. You will need to have a Browserstack automate account.

Using:

::: tip This is part of the default open-wc recommendation :::

Setup

npm init @open-wc testing-karma-bs

# follow Setup user + key

Manual

  • yarn add @open-wc/testing-karma-bs --dev
  • Copy karma.es5.bs.config.js to karma.es5.bs.config.js
  • Add these scripts to your package.json
    "scripts": {
      "test:es5:bs": "karma start karma.es5.bs.config.js"
    },
    

Setup user + key

# for one time use only
export BROWSER_STACK_USERNAME=xxx
export BROWSER_STACK_ACCESS_KEY=xxx

# or add them to your .bashrc
echo "export BROWSER_STACK_USERNAME=xxx" >> ~/.bashrc
echo "export BROWSER_STACK_ACCESS_KEY=xxx" >> ~/.bashrc

# to verify, run:
echo "User: $BROWSER_STACK_USERNAME"
echo "Key: $BROWSER_STACK_ACCESS_KEY"

Usage

npm run test:es5:bs
<script> export default { mounted() { const editLink = document.querySelector('.edit-link a'); if (editLink) { const url = editLink.href; editLink.href = url.substr(0, url.indexOf('/master/')) + '/master/packages/testing-karma-bs/README.md'; } } } </script>