mirror of https://github.com/vuejs/vue.git
19 lines
290 B
JavaScript
19 lines
290 B
JavaScript
|
|
import Vue from 'vue'
|
||
|
|
|
||
|
|
describe('Options methods', () => {
|
||
|
|
it('should have correct context', () => {
|
||
|
|
const vm = new Vue({
|
||
|
|
data: {
|
||
|
|
a: 1
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
plus () {
|
||
|
|
this.a++
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
vm.plus()
|
||
|
|
expect(vm.a).toBe(2)
|
||
|
|
})
|
||
|
|
})
|