Fix test commands

Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
This commit is contained in:
Marco Ambrosini 2020-03-18 10:45:29 +01:00
parent 7e09d7eee6
commit 378b298e16
3 changed files with 6 additions and 3 deletions

View file

@ -28,6 +28,9 @@ build-js-production:
watch-js:
npm run watch
test:
npm run test:unit
lint:
npm run lint

View file

@ -6,7 +6,7 @@
"author": "Joas Schilling <coding@schilljs.com>",
"scripts": {
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js",
"test:unit": "vue-cli-service test:unit",
"test:unit": "vue-cli-service test:unit --watch",
"lint": "eslint --ext .js,.vue src",
"dev": "NODE_ENV=development webpack --config webpack.dev.js",
"lint:fix": "eslint --ext .js,.vue src --fix",

View file

@ -1,10 +1,10 @@
import { shallowMount } from '@vue/test-utils'
import HelloWorld from '@/components/HelloWorld.vue'
import Topbar from '../../src/components/TopBar'
describe('HelloWorld.vue', () => {
it('renders props.msg when passed', () => {
const msg = 'new message'
const wrapper = shallowMount(HelloWorld, {
const wrapper = shallowMount(Topbar, {
propsData: { msg }
})
expect(wrapper.text()).toMatch(msg)