Files
vue-cli/packages/@vue/cli-plugin-unit-jest
Evan You d595adacf4 refactor: adjust mode loading order
BREAKING CHANGE: PluginAPI.setMode() has been removed. Instead, for a plugin to
sepcify the default mode for a registered command, the plugins should expose
`module.exports.defaultModes` in the form of `{ [commandName]: mode }`.

close #959
2018-05-01 17:14:33 -04:00
..
2018-04-30 18:35:36 -04:00
2018-01-05 09:20:20 -05:00
2018-05-01 17:14:33 -04:00
2018-04-27 22:35:57 -04:00

@vue/cli-plugin-unit-jest

unit-jest plugin for vue-cli

Injected Commands

  • vue-cli-service test

    Run unit tests with Jest. Default files matches are:

    • Any files in tests/unit that end in .spec.(js|ts);
    • Any js/ts files inside __tests__ directories.

    Usage: vue-cli-service test [options] <regexForTestFiles>

    All Jest command line options are also supported.

Configuration

Jest can be configured via jest.config.js in your project root, or the jest field in package.json.

Installing in an Already Created Project

npm install -D @vue/cli-plugin-unit-jest
vue invoke unit-jest