Skip to content

Support for Preact X#69

Merged
developit merged 3 commits intodevelopit:masterfrom
pl12133:preactX
Jul 10, 2019
Merged

Support for Preact X#69
developit merged 3 commits intodevelopit:masterfrom
pl12133:preactX

Conversation

@pl12133
Copy link
Collaborator

@pl12133 pl12133 commented Jun 12, 2019

It looks like the shape of a VNode has changed, so preact-jsx-chai has stopped finding VNodes and the calls to expect(...).to.eql(...) have stopped working correctly.

Still working on getting all the tests to pass.

TODO:

  • Tests

@marvinhagemeister
Copy link
Contributor

Oh shoot I completely forgot to check existing PRs when doing #70 :(


// assert that an object is JSX (or more correctly, a VNode)
let isJsx = obj => obj && (options.isJsx ? options.isJsx(obj) : (obj.__isVNode || isVNode(obj)));
let isJsx = obj => obj && (options.isJsx ? options.isJsx(obj) : (obj._vnode || isVNode(obj)));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this, but @pl12133 I can't seem to remember what __isVNode was being used for. It doesn't seem to have ever been in preact or compat. Do you know?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through some history and it seems like this was in preact since the beginning, but it must have been removed a long time ago:

https://github.com/preactjs/preact/blob/e9f1a5645ef7d10ba05c601b94d70e4e4d0bd57f/src/preact.js#L204

@developit developit merged commit 35208f0 into developit:master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants