mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-04 14:08:27 -06:00
BREAKING CHANGE: `cli-plugin-unit-jest` and `cli-plugin-unit-mocha` now register "test:unit" command and script instead of "test"; `cli-plugin-e2e-cypress` now register "test:e2e" with optional `--headless` flag instead of "e2e" and "e2e:open"; `cli-plugin-e2e-nightwatch` now register "test:e2e" instead of "e2e". close #876, close #878
@vue/cli-plugin-unit-mocha
unit-mocha plugin for vue-cli
Injected Commands
-
vue-cli-service test:unitRun unit tests with mocha-webpack + chai.
Note the tests are run inside Node.js with browser environment simulated with JSDOM.
Usage: vue-cli-service test:unit [options] [...files] Options: --watch, -w run in watch mode --grep, -g only run tests matching <pattern> --slow, -s "slow" test threshold in milliseconds --timeout, -t timeout threshold in milliseconds --bail, -b bail after first test failure --require, -r require the given module before running tests --include include the given module into test bundleDefault files matches are: any files in
tests/unitthat end in.spec.(ts|js).All mocha-webpack command line options are also supported.
Installing in an Already Created Project
vue add unit-mocha