Skip to content

Commit 8f99a9d

Browse files
committed
Update tests to preact 7
1 parent 506a4eb commit 8f99a9d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
"babel-plugin-transform-react-jsx": "^6.8.0",
4141
"babel-preset-es2015": "^6.9.0",
4242
"babel-preset-es2015-minimal": "^2.0.0",
43-
"babel-preset-es2015-minimal-rollup": "^2.0.0",
43+
"babel-preset-es2015-minimal-rollup": "^2.1.0",
4444
"babel-preset-stage-0": "^6.5.0",
4545
"babel-register": "^6.9.0",
4646
"chai": "^3.5.0",
4747
"eslint": "^3.2.2",
4848
"mocha": "^3.0.0",
49-
"preact": "^6.1.0",
49+
"preact": "^7.1.0",
5050
"rollup": "^0.34.3",
5151
"rollup-plugin-babel": "^2.6.1",
5252
"rollup-plugin-commonjs": "^3.3.1",

test/render.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('render', () => {
2525

2626
it('should collapse collapsible attributes', () => {
2727
let rendered = render(<div class="" style="" foo={true} bar />),
28-
expected = `<div foo bar></div>`;
28+
expected = `<div class style foo bar></div>`;
2929

3030
expect(rendered).to.equal(expected);
3131
});
@@ -254,13 +254,13 @@ describe('render', () => {
254254
render(<Outer />);
255255

256256
expect(Outer.prototype.getChildContext).to.have.been.calledOnce;
257-
expect(Inner.prototype.render).to.have.been.calledWith({}, {}, CONTEXT);
257+
expect(Inner.prototype.render).to.have.been.calledWith(match({}), {}, CONTEXT);
258258

259259
CONTEXT.foo = 'bar';
260260
render(<Outer {...PROPS} />);
261261

262262
expect(Outer.prototype.getChildContext).to.have.been.calledTwice;
263-
expect(Inner.prototype.render).to.have.been.calledWith(PROPS, {}, CONTEXT);
263+
expect(Inner.prototype.render).to.have.been.calledWith(match(PROPS), {}, CONTEXT);
264264
});
265265

266266
it('should pass context to direct children', () => {
@@ -287,13 +287,13 @@ describe('render', () => {
287287
render(<Outer />);
288288

289289
expect(Outer.prototype.getChildContext).to.have.been.calledOnce;
290-
expect(Inner.prototype.render).to.have.been.calledWith({}, {}, CONTEXT);
290+
expect(Inner.prototype.render).to.have.been.calledWith(match({}), {}, CONTEXT);
291291

292292
CONTEXT.foo = 'bar';
293293
render(<Outer {...PROPS} />);
294294

295295
expect(Outer.prototype.getChildContext).to.have.been.calledTwice;
296-
expect(Inner.prototype.render).to.have.been.calledWith(PROPS, {}, CONTEXT);
296+
expect(Inner.prototype.render).to.have.been.calledWith(match(PROPS), {}, CONTEXT);
297297

298298
// make sure render() could make use of context.a
299299
expect(Inner.prototype.render).to.have.returned(match({ children:['a'] }));
@@ -331,8 +331,8 @@ describe('render', () => {
331331

332332
render(<Outer />);
333333

334-
expect(Inner.prototype.render).to.have.been.calledWith({}, {}, { outerContext });
335-
expect(InnerMost.prototype.render).to.have.been.calledWith({}, {}, { outerContext, innerContext });
334+
expect(Inner.prototype.render).to.have.been.calledWith(match({}), {}, { outerContext });
335+
expect(InnerMost.prototype.render).to.have.been.calledWith(match({}), {}, { outerContext, innerContext });
336336
});
337337
});
338338

0 commit comments

Comments
 (0)