Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
⚡ improvement: upgrade vue releated templates
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 27, 2018
1 parent 8f11558 commit 98b3123
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
4 changes: 3 additions & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
"nightwatch-helpers": "^1.2.0",
"selenium-server": "2.53.1",
{{/e2e}}
"vue": "^2.1.10",
"vue": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"@vue/test-utils": "^1.0.0-beta.16",
"webpack": "^4.9.1",
"webpack-serve": "^1.0.2"
},
Expand Down
25 changes: 13 additions & 12 deletions template/test/unit/add.test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import Vue from 'vue'
import { mount } from '@vue/test-utils'

describe('$add', () => {
let vm

beforeEach(() => {
vm = new Vue()
})
const MyComp = {
name: 'my-comp',
template: `
<p>add: $add(1, 1)</p>
`
}

describe('$add', () => {
describe('1 + 1', () => {
it('should be 2', done => {
nextTick(() => {
assert(vm.$add(1, 1) === 2, 'You should be implemented!!')
}).then(done)
describe('with mount', () => {
it('should be 2', () => {
const wrapper = mount(MyComp)
assert(wrapper.html(), '<p>add: 2</p>')
})
})
})
})

0 comments on commit 98b3123

Please sign in to comment.