Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocha Tests Throwing Exceptions Immediately After Project Creation When Manually Selecting Features #3668

Closed
derek-baker opened this issue Mar 19, 2019 · 3 comments
Labels
needs team repro We acknowledged your report and will soon try to reproduce it

Comments

@derek-baker
Copy link

Version

3.5.1

Reproduction link

https://github.com/derek-baker/super-duper-guacamole

Environment info

System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz
  Binaries:
    Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

npm run test:unit

What is expected?

Out of box vue-cli config produces a unit test that runs without an exception

What is actually happening?

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

@derek-baker
Copy link
Author

derek-baker commented Mar 19, 2019

In regards to the Environment Info, I'm not sure why 'vue info' doesn't find @vue/cli, as it's definitely installed globally, and %appdata%\npm was added to my path.

@LinusBorg LinusBorg added the needs team repro We acknowledged your report and will soon try to reproduce it label Mar 19, 2019
@derek-baker
Copy link
Author

derek-baker commented Mar 19, 2019

@derek-baker
Copy link
Author

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.

{
"name": "vue-cli-test",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"vue": "^2.6.6",
"vue-class-component": "^6.0.0",
"vue-property-decorator": "^7.0.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@types/chai": "^4.1.0",
"@types/mocha": "^5.2.4",
"@vue/cli-plugin-babel": "^3.5.0",
"@vue/cli-plugin-e2e-cypress": "^3.5.0",
"@vue/cli-plugin-typescript": "^3.5.0",
"@vue/cli-plugin-unit-mocha": "^3.5.0",
"@vue/cli-service": "^3.5.0",
"@vue/test-utils": "1.0.0-beta.29",
"chai": "^4.1.2",
"typescript": "^3.2.1",
"vue-template-compiler": "^2.5.21"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs team repro We acknowledged your report and will soon try to reproduce it
Projects
None yet
Development

No branches or pull requests

2 participants