Files
vue-cli/packages/@vue/cli-plugin-unit-mocha
Haoqun Jiang 9a1d52e2ff feat: create projects with @vue/test-utils beta 31 (#5147)
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.
2020-02-06 14:27:21 +08:00
..
2018-03-20 01:39:26 +01:00

@vue/cli-plugin-unit-mocha

unit-mocha plugin for vue-cli

Injected Commands

  • vue-cli-service test:unit

    Run 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 tests
    

    Default files matches are: any files in tests/unit that end in .spec.(ts|js).

    All mochapack command line options are also supported.

Installing in an Already Created Project

vue add unit-mocha