diff --git a/test/specs/mounting-options/sync.spec.js b/test/specs/mounting-options/sync.spec.js index 7426d1ce4..8881fec48 100644 --- a/test/specs/mounting-options/sync.spec.js +++ b/test/specs/mounting-options/sync.spec.js @@ -113,9 +113,17 @@ describeWithShallowAndMount('options.sync', (mountingMethod) => { }) it('call updated when sync is not false', () => { + const fooSpy = sinon.stub() + const Foo = { + template: '
{{ foo }}
', + props: ['foo'], + updated () { + fooSpy() + } + } const spy = sinon.stub() const TestComponent = { - template: '
{{ foo }}
', + template: '
{{ foo }}
', data () { return { foo: 'foo' @@ -126,10 +134,14 @@ describeWithShallowAndMount('options.sync', (mountingMethod) => { } } const wrapper = mountingMethod(TestComponent, { + stubs: { foo: Foo }, sync: true }) expect(spy.notCalled).to.equal(true) + expect(fooSpy.notCalled).to.equal(true) wrapper.vm.foo = 'bar' expect(spy.calledOnce).to.equal(true) + expect(fooSpy.calledOnce).to.equal(true) + expect(wrapper.html()).to.equal('
bar
bar
') }) })