|
|
@@ -1,6 +1,6 @@
|
|
|
var Vue = require('../../../../src/vue')
|
|
|
|
|
|
-describe('Instance Scope', function () {
|
|
|
+describe('Instance state initialization', function () {
|
|
|
|
|
|
describe('data proxy', function () {
|
|
|
|
|
|
@@ -180,6 +180,7 @@ describe('Instance Scope', function () {
|
|
|
},
|
|
|
// cached
|
|
|
f: {
|
|
|
+ cache: true,
|
|
|
get: function () {
|
|
|
spyF()
|
|
|
return this.ff
|
|
|
@@ -191,6 +192,7 @@ describe('Instance Scope', function () {
|
|
|
},
|
|
|
// another cached, for watcher test
|
|
|
h: {
|
|
|
+ cache: true,
|
|
|
get: function () {
|
|
|
return this.hh
|
|
|
}
|
|
|
@@ -302,27 +304,6 @@ describe('Instance Scope', function () {
|
|
|
expect(vm.d).toBe('CD')
|
|
|
expect(vm.e).toBe('CDe')
|
|
|
})
|
|
|
-
|
|
|
- it('disable cache', function () {
|
|
|
- var external = { b: 'B' }
|
|
|
- var vm = new Vue({
|
|
|
- data: {
|
|
|
- a: 'A'
|
|
|
- },
|
|
|
- computed: {
|
|
|
- test: {
|
|
|
- cache: false,
|
|
|
- get: function () {
|
|
|
- return this.a + external.b
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- expect(vm.test).toBe('AB')
|
|
|
- external.b = 'C'
|
|
|
- expect(vm.test).toBe('AC')
|
|
|
- })
|
|
|
-
|
|
|
})
|
|
|
|
|
|
describe('methods', function () {
|