Files
vue-cli/packages/@vue/cli-plugin-unit-mocha
Haoqun Jiang 0909bc8688 fix: revert file name hashing in dev mode
closes #2492

The change was intended to mitigate the problem that Safari keeps caching
dev bundles.

But it caused several unintended bugs:
1. [Hashes in file names with HMR enabled might cause memory leaks](https://github.com/webpack/webpack-dev-server/issues/377#issuecomment-241258405)
2. Moving the hash to file query also breaks many webpack loaders:
  1. [mocha-webpack](f683583078)
  2. [django-webpack-loader](https://github.com/vuejs/vue-cli/issues/2492))

So till we find a better way to solve this issue, hashes in dev bundles
should be removed.
2018-09-12 12:49:54 +08:00
..
2018-03-20 01:39:26 +01:00
2018-09-11 22:45:32 +08: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
      --inspect-brk Enable inspector to debug the tests
    

    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 @vue/unit-mocha