We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e4e83f commit c41f65cCopy full SHA for c41f65c
test/unit/modules/observer/observer.spec.js
@@ -355,4 +355,18 @@ describe('Observer', () => {
355
expect(obj.__ob__ instanceof Observer).toBe(true)
356
})
357
358
+
359
+ it('should lazy invoke existing getters', () => {
360
+ const obj = {}
361
+ let called = false
362
+ Object.defineProperty(obj, 'getterProp', {
363
+ enumerable: true,
364
+ get: () => {
365
+ called = true
366
+ return 'some value'
367
+ }
368
+ })
369
+ observe(obj)
370
+ expect(called).toBe(false)
371
372
0 commit comments