diff --git a/test/unit/bind.html b/test/unit/bind.html index d17821a560..5ff558335f 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -506,12 +506,13 @@ }); test('listener for value-changed fires when value changed from host', function() { + var listener = sinon.spy(); + el.$.basic1.addEventListener('notifyingvalue-changed', listener); + el.boundnotifyingvalue = 678; + assert.equal(el.$.basic1.notifyingvalue, 678); + assert.equal(listener.callCount, + Polymer.Settings.suppressBindingNotifications ? 0 : 1); if (!Polymer.Settings.suppressBindingNotifications) { - var listener = sinon.spy(); - el.$.basic1.addEventListener('notifyingvalue-changed', listener); - el.boundnotifyingvalue = 678; - assert.equal(el.$.basic1.notifyingvalue, 678); - assert.isTrue(listener.calledOnce); assert.equal(listener.getCalls()[0].args[0].detail.value, 678); } });