From 378b298e16b00e9181739e86498f5d2c0125e285 Mon Sep 17 00:00:00 2001 From: Marco Ambrosini Date: Wed, 18 Mar 2020 10:45:29 +0100 Subject: [PATCH] Fix test commands Signed-off-by: Marco Ambrosini --- Makefile | 3 +++ package.json | 2 +- tests/unit/example.spec.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1dc93c1627..8e9c2ff272 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ build-js-production: watch-js: npm run watch +test: + npm run test:unit + lint: npm run lint diff --git a/package.json b/package.json index 169a383f22..05218a1070 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "Joas Schilling ", "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", diff --git a/tests/unit/example.spec.js b/tests/unit/example.spec.js index f84fb39dce..96cbce9d92 100644 --- a/tests/unit/example.spec.js +++ b/tests/unit/example.spec.js @@ -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)