diff options
author | Marco Ambrosini <marcoambrosini@pm.me> | 2020-03-18 12:45:29 +0300 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@pm.me> | 2020-03-18 12:45:29 +0300 |
commit | 378b298e16b00e9181739e86498f5d2c0125e285 (patch) | |
tree | edd65334f87a85549a2fa30c8960de0958bd0621 | |
parent | 7e09d7eee6eda5ee1199301709826d3a41834722 (diff) |
Fix test commands
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | tests/unit/example.spec.js | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -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 169a383f2..05218a107 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/unit/example.spec.js b/tests/unit/example.spec.js index f84fb39dc..96cbce9d9 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) |