mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-05 22:48:27 -06:00
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.
@vue/cli-plugin-unit-mocha
unit-mocha plugin for vue-cli
Injected Commands
-
vue-cli-service test:unitRun 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 testsDefault files matches are: any files in
tests/unitthat 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