The following npm scripts are the main entrypoints for building and testing the Cisco Webex JS SDK.
Build all packages.
npm run buildBuild a single package.
npm run build:package @webex/webex-coreDetect dependencies for each package and insert into the appropriate package.json.
npm run deps:generateLint all JavaScript files.
npm run lint:jsOptions may be specified as switches or via environment variables.
Test all packages
npm testSee all options
npm test -- --helpTest a single package
npm test -- --packages @webex/webex-coreTest a single package, but only in a browser
npm test -- --packages @webex/webex-core --browserTest a single package, but only in a specific browser
BROWSER=chrome npm test -- --packages @webex/webex-core --browserTest a single package and generate coverage and xunit reports
npm test -- --packages @webex/webex-core --coverage --xunitTest a single package using snapshots rather than live network requests. The test must be run in Node.
npm test -- --packages @webex/webex-core --node --snapshotsKeeps the browser open in debug mode so that you can set break points and reload the page with code updates
npm test -- --packages @webex/webex-core --browser --karma-debugmake sure Java JDK is installed on your machine to run test locally
npm run samples:testThe SDK uses SauceLabs to run its tests. Sign in to retrieve your USERNAME and ACCESS KEY from User Settings and add them to your .env file:
SAUCE_USERNAMESAUCE_ACCESS_KEY
Start the SauceLabs tunnel, run tests using SauceLabs browsers, and stop the SauceLabs tunnel
# Run all tests on SauceLabs with default configuration
SAUCE=true npm run test
# Run the samples automation tests on SauceLabs
SAUCE=true npm run samples:test
# Run `plugin-teams` test suite on SauceLabs only only Edge and IE 11
SAUCE=true npm run test -- --packages @webex/plugin-teams --os Windows --browsers Edge IE
# Run all tests on SauceLabs only with Chrome on Mac and Windows
SAUCE=true npm run test -- --browsers ChromePoints all of the package.jsons' main entry to their "src" folder. This is useful when testing because it doesn't require you to build a "dist" folder before every run of the test.
npm run distsrcUsed to undo the changes made with distsrc.
npm run srcdist