Before you run anything else, make sure you have the dependencies pulled down:
npm install
npm run-script test -- <arguments>
Open a web browser to http://localhost:9876/debug.html and use DevTools
(Cmd+Alt+i or Ctrl+Shift+i) to debug. Refreshing the window will re-run the
unit tests.
Any <arguments> will be passed to the karma executable (full list
here).
Tests are configured to run in the Chrome browser by default. To use a
different browser, download the karma
launcher for your
preferred browser and pass the --browsers argument, e.g.
npm install karma-firefox-launcher
npm run-script test -- --browsers=Firefox
If you only want to run the unit tests once on the command line, use npm run-script coverage.
npm run-script coverage
Open test/coverage/<browser>/lcov-report/index.html in a web browser to view
coverage results.
npm run-script <module-format>
Where <module-format> is one of:
amd: transcompilesrc/to AMD modules and write tobuild/amd/commonjs: transcompilesrc/to CommonJS modules and write tobuild/commonjs/es: transcompilesrc/to ES6 modules and write tobuild/es/--all: transcompilesrc/to all of the above module formats
npm run-script publish
Lavaca is distributed in three npm packages:
lavaca-amd: lavaca transcompiled to AMD formatlavaca-commonjs: lavaca transcompiled to CommonJS formatlavaca-es6: lavaca in its original ES6 module format
If you are a package owner of all three, npm run-script publish will build
all three flavors of Lavaca and publish each one to the npm registry.