mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-25 00:29:06 -06:00
See changelog at https://github.com/vuejs/vue-test-utils/blob/v1.0.0-beta.31/CHANGELOG.md#100-beta31-2020-01-18 New projects will be created with this new version. There are a few breaking changes since beta.29. So we can't automatically migrate existing projects to this new version. Users can upgrade at their own will.
@vue/cli-plugin-unit-mocha
unit-mocha plugin for vue-cli
Injected Commands
-
vue-cli-service test:unitRun unit tests with mochapack + 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 bundle --inspect-brk Enable inspector to debug the testsDefault files matches are: any files in
tests/unitthat end in.spec.(ts|js).All mochapack command line options are also supported.
Installing in an Already Created Project
vue add unit-mocha