diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:07:07 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-08 15:19:39 +0100 |
commit | afb9fba64be1f15a3ce3ed31214a704e73e5e8bb (patch) | |
tree | 6f69712a8c976178c05144483ff0c8e9b09445c8 /thirdparty/preact/test/browser/linked-state.js | |
parent | b37e7762bb5492cbd6788863232e7d2634ab5e5c (diff) | |
parent | 6e5fb04d3f3f9a6cd43ac20896d73321dd079f96 (diff) |
Update preact version
Diffstat (limited to 'thirdparty/preact/test/browser/linked-state.js')
-rw-r--r-- | thirdparty/preact/test/browser/linked-state.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/thirdparty/preact/test/browser/linked-state.js b/thirdparty/preact/test/browser/linked-state.js index 1ca84cdc6..03db2a7b8 100644 --- a/thirdparty/preact/test/browser/linked-state.js +++ b/thirdparty/preact/test/browser/linked-state.js @@ -26,7 +26,10 @@ describe('linked-state', () => { element.type= 'text'; element.value = 'newValue'; - linkFunction({ currentTarget: element }); + linkFunction({ + currentTarget: element, + target: element + }); expect(TestComponent.prototype.setState).to.have.been.calledOnce; expect(TestComponent.prototype.setState).to.have.been.calledWith({'testStateKey': 'newValue'}); @@ -42,7 +45,10 @@ describe('linked-state', () => { checkboxElement.type= 'checkbox'; checkboxElement.checked = true; - linkFunction({ currentTarget: checkboxElement }); + linkFunction({ + currentTarget: checkboxElement, + target: checkboxElement + }); expect(TestComponent.prototype.setState).to.have.been.calledOnce; expect(TestComponent.prototype.setState).to.have.been.calledWith({'testStateKey': true}); @@ -53,7 +59,10 @@ describe('linked-state', () => { radioElement.type= 'radio'; radioElement.checked = true; - linkFunction({ currentTarget: radioElement }); + linkFunction({ + currentTarget: radioElement, + target: radioElement + }); expect(TestComponent.prototype.setState).to.have.been.calledOnce; expect(TestComponent.prototype.setState).to.have.been.calledWith({'testStateKey': true}); @@ -66,7 +75,10 @@ describe('linked-state', () => { element.type= 'text'; element.value = 'newValue'; - linkFunction({ currentTarget: element }); + linkFunction({ + currentTarget: element, + target: element + }); expect(TestComponent.prototype.setState).to.have.been.calledOnce; expect(TestComponent.prototype.setState).to.have.been.calledWith({nested: {state: {key: 'newValue'}}}); |