Skip to content

Commit e056417

Browse files
committed
fix test template
1 parent 80cf508 commit e056417

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"description": "Create Vue app with no build configurations",
55
"scripts": {
6-
"test": "npm run lint && ava",
6+
"test": "npm run lint && npm run ava",
77
"ava": "ava test/test.js",
88
"lint": "xo"
99
},

template/src/components/App.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import Vue from 'vue'
22
import App from './App.vue'
3-
import assert from 'assert'
3+
4+
Vue.config.productionTip = false
45

56
it('does not crash', () => {
67
const Ctor = Vue.extend(App)
78
const vm = new Ctor().$mount()
8-
assert(/Welcome to Vue\.js/.test(vm.$el.textContent))
9+
expect(vm.$el.textContent).toMatch(/Welcome to Vue\.js/)
910
})

template/src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Vue from 'vue'
22
import App from './components/App.vue'
33

4+
Vue.config.productionTip = false
5+
46
new Vue({
57
el: '#app',
68
render: h => h(App)

0 commit comments

Comments
 (0)