ui-karma plugin(ui) for vue-cli 3.x
This adds unit testing support using Karma.
- Run unit tests in headless chrome(default) with
vue-cli-service karma --file karma.conf.js
. - Add customizable karma conf files for vue project.
- Add demo unit tests for normal vue project and example element-ui unit tests for vue project with element-ui.
-
vue-cli-service karma
run unit tests with karma.
Options:
start run unit tests against auto-starting karma server karma.conf.*.js runs with a specific karma conf file. (default: karma.conf.js)
This command automatically starts a karma server in development mode to run the unit tests against.
We've pre-configured Karma to place most of the unit testing related files under <projectRoot>/
.
npm install -D vue-cli-plugin-ui-karma
npm install -g vue-cli-addon-ui-karma