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/spec.js | |
parent | b37e7762bb5492cbd6788863232e7d2634ab5e5c (diff) | |
parent | 6e5fb04d3f3f9a6cd43ac20896d73321dd079f96 (diff) | |
download | wallet-core-afb9fba64be1f15a3ce3ed31214a704e73e5e8bb.tar.xz |
Update preact version
Diffstat (limited to 'thirdparty/preact/test/browser/spec.js')
-rw-r--r-- | thirdparty/preact/test/browser/spec.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/thirdparty/preact/test/browser/spec.js b/thirdparty/preact/test/browser/spec.js index eb48151f0..d33cdb93f 100644 --- a/thirdparty/preact/test/browser/spec.js +++ b/thirdparty/preact/test/browser/spec.js @@ -1,6 +1,8 @@ import { h, render, rerender, Component } from '../../src/preact'; /** @jsx h */ +const EMPTY_CHILDREN = []; + describe('Component spec', () => { let scratch; @@ -24,6 +26,7 @@ describe('Component spec', () => { constructor(props, context) { super(props, context); expect(props).to.be.deep.equal({ + children: EMPTY_CHILDREN, fieldA: 1, fieldB: 2, fieldC: 1, fieldD: 2 }); @@ -81,14 +84,14 @@ describe('Component spec', () => { fieldC: 1, fieldD: 2 }; - expect(proto.ctor).to.have.been.calledWith(PROPS1); - expect(proto.render).to.have.been.calledWith(PROPS1); + expect(proto.ctor).to.have.been.calledWithMatch(PROPS1); + expect(proto.render).to.have.been.calledWithMatch(PROPS1); rerender(); // expect(proto.ctor).to.have.been.calledWith(PROPS2); - expect(proto.componentWillReceiveProps).to.have.been.calledWith(PROPS2); - expect(proto.render).to.have.been.calledWith(PROPS2); + expect(proto.componentWillReceiveProps).to.have.been.calledWithMatch(PROPS2); + expect(proto.render).to.have.been.calledWithMatch(PROPS2); }); // @TODO: migrate this to preact-compat |