aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/preact/test/browser/spec.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-08 15:07:07 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-08 15:19:39 +0100
commitafb9fba64be1f15a3ce3ed31214a704e73e5e8bb (patch)
tree6f69712a8c976178c05144483ff0c8e9b09445c8 /thirdparty/preact/test/browser/spec.js
parentb37e7762bb5492cbd6788863232e7d2634ab5e5c (diff)
parent6e5fb04d3f3f9a6cd43ac20896d73321dd079f96 (diff)
downloadwallet-core-afb9fba64be1f15a3ce3ed31214a704e73e5e8bb.tar.xz
Update preact version
Diffstat (limited to 'thirdparty/preact/test/browser/spec.js')
-rw-r--r--thirdparty/preact/test/browser/spec.js11
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