After creating a project with vue-cli(v3.5.1), the unit test that was auto-created is failing when I run: 'npm run test:unit'.
After running 'vue create', I manually selected the following options: TS, Router, Vuex, Linter, Unit, E2E, class-style component syntax: yes, Babel: no, history mode: no, linter: TSLint, Lint on save, unit-test solution: Mocha, E2E test solution Cypress, config files: dedicated files.
The output of 'npm run test:unit' is below.
WEBPACK Compiled successfully in 7321ms
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
ReferenceError: performance is not defined at Module../node_modules/vue/dist/vue.runtime.esm.js
I attempted to modify the npm script used to run the test as below(wasn't really sure if the include was coming from Node, and I don't think that it should be), but I just get an error stating that perf_hooks wasn't found in \node_modules\mocha-webpack\lib.
"test:unit": "vue-cli-service test:unit --include perf_hooks"
Code example: https://github.com/derek-baker/super-duper-guacamole
If, in addition to the options above, I opt to include Babel as a feature, and also use Babel alongside TypeScript for auto-detected polyfills, the unit-test runs as expected. Example of working config is below.