No Mocha version is shown in the package.json when testing with cypress - repository

I am using cypress. But as I understand the cypress is built above mocha. So, I want to check what mocha version the project I am working with uses. I am heading to the package.json doing the search, but finding no mocha dependencies. Does it mean that mocha is built into cypress? How could I determine the used inside cypress mocha version then?

You can find out from the Cypress Github repository package.json.
The latest is here
"mocha": "3.5.3"

Related

How do I have the cli add an e2e folder for my app?

I would like to do end-to-end testing with my Angular5/ionic3 app but I notice there is no e2e folder in it. What do I need to do to use the cli to generate a e2e folder so I can begin writing my e2e tests?
I did it manually, I added the following files to my project and was able to implement e2e testing keeping Ionic3/Angular5...
https://github.com/DocGreenRob/help/tree/master/ui-ux-partial
see
e2e/
test-config/
package.json

Should my Vue plugin that i'm about to publish depend on Vue itself?

I wrote a Vue (2) plugin and am about to publish it to NPM. The question is should the plugin's package.json contain
"dependencies": {
"vue": "^2.5.21"
}
I'm pretty sure it should because it's clear that the plugin won't work without Vue itself. But at the same time i'm doubting: who would even try to use Vue plugin without Vue already installed as a project's dependency? And if I don't add it to the dependencies list then how would I be able to specify which versions of Vue the plugin does work with? (For example, if a user uses Vue 2.1.3 and my plugin will only work with versions starting from 2.5.17)

Configure Mocha unit tests after creating project using #vue/cli 3

Created a project using vue/cli version 3.2.1.
Trying to configuring Mocha unit testing in vue/cli 3, but no success.
Any help appreciated

How to check a projects vue.js version?

I use Ubuntu 16.04 and I'd like to know how I check the vue.js version used by my project.
How do I do that?
Let's summarize the solutions from #jonrsharpe, #JamesAMohler and #MartinCalvert for friends looking for a quick answer.
Run npm list vue (or npm list --depth=0 | grep vue to exclude packages' dependencies). It is a common way to check npm package's version in the terminal.
Of course, you can also check vuejs's version by browsing package.json (or use command like less package.json | grep vue).
Use Vue.version during the runtime. It is a global API provided in vue.js.
If you have the Vue.js Chrome dev tool extension installed and your application is built in development mode you can simply open up the Chrome Dev Tools and use the Vue extension tab. It is clearly displays the Vue version for the project at the top (see below)
Please simply try type npm v vue in terminal to check the version of Vue.js
This is what worked for me:
import Vue from 'vue'
alert(`Vue version : ${Vue.version}`);
If you want to check the current version of Vue installed in your machine use vue --version
If you want to check the Vue installed on the project then use npm list | grep vue#
There are few ways to check vue version:
npm v vue run this on the terminal
Check package.json, code will be something like this
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11"
},
If you have vue dev tools installed then go to the Vue tab and you should be able to see the version there.
Note: If you use vue --version - this will check vue cli version, not Vue version
It can be checked from package.json file. Inside dependencies block you can see vue and its version.
"dependencies": {
"vue": "^2.6.11"
}
if you have installed vue dev tools extension like I recommend, you can just press ctrl + shift + i at least in the firefox and then look with vue extension picture
You can also just use npm v vue in command prompt, you cant use vue --version becausue this checks what Vue CLI you have
You can only use npm v vue in CLI/ in Terminal, you can't use vue --version, it shows error enter image description here
For the solution of in-app version showing for vue version 3+.
As #ray-foss mentioned: I am only able to use
import {version} from "vue";
console.log('Vue version', version);
The way using import Vue from 'vue' does not work anymore (for me).
You can also type to check the Vuejs version vue --version

Vue js Cli app running in another computer

I would like to share my Vue js application project which is in my repository with a friend. So I used vue-cli, npm/yarn and webpack to develope.
I would like to know if he needs to install also cli to run the app on his computer, or just npm install and npm run? thanks
No, the vue-cli is not strictly necessary. However, if you're used to using vue build to build & run your app, your friend might want that too. He/she could just use some other way to run the webpack build operation if installing vue-cli isn't an option.