Browse Source

test: remove unused code (#9684)

dev
Decade 6 years ago
committed by Evan You
parent
commit
2747a65765
  1. 12
      test/unit/modules/observer/observer.spec.js

12
test/unit/modules/observer/observer.spec.js

@ -226,19 +226,7 @@ describe('Observer', () => {
})
observe(obj)
// mock a watcher!
const watcher = {
deps: [],
addDep: function (dep) {
this.deps.push(dep)
dep.addSub(this)
},
update: jasmine.createSpy()
}
// collect dep
Dep.target = watcher
expect(obj.a).toBe(2) // Make sure 'this' is preserved
Dep.target = null
obj.a = 3
expect(obj.val).toBe(3) // make sure 'setter' was called
obj.val = 5

Loading…
Cancel
Save