Files
vue-cli/packages/@vue/cli-plugin-unit-mocha
Evan You 69ebd800a2 refactor: rename test commands
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
2018-05-01 18:15:25 -04:00
..
2018-05-01 18:15:25 -04:00
2018-05-01 18:15:25 -04:00
2018-01-11 00:37:21 -05:00
2018-05-01 18:15:25 -04:00
2018-04-27 22:35:57 -04:00
2018-05-01 18:15:25 -04:00
2018-01-11 00:37:21 -05:00

@vue/cli-plugin-unit-mocha

unit-mocha plugin for vue-cli

Injected Commands

  • vue-cli-service test:unit

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

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

    All mocha-webpack command line options are also supported.

Installing in an Already Created Project

vue add unit-mocha