Just found an issue when trying to upgrade to preact 8.1.0 on my component tests, it looks like when there is a null/false evaluation with a valid sibling vnode, the deep.equal assertion fails. I can explain better with an example, the test code is:
it('be triggered when JSX has null evaluation next to a valid sibling node', () => {
expect(<jsx><span/>{null}</jsx>).to.deep.equal(<jsx><span/></jsx>);
});
and the result output is
1) preact-jsx-chai assertJsx() sanity be triggered when JSX has null evaluation next to a valid sibling node:
AssertionError: expected '<jsx>\n <span></span>\n \n</jsx>' to equal '<jsx>\n <span></span>\n</jsx>'
+ expected - actual
<jsx>
<span></span>
-
</jsx>
Just found an issue when trying to upgrade to preact 8.1.0 on my component tests, it looks like when there is a
null
/false
evaluation with a valid sibling vnode, thedeep.equal
assertion fails. I can explain better with an example, the test code is:and the result output is
I also have a custom branch to test this out.
Is this a known issue? is there any workaround this problem?
I will keep digging into this, I will update this issue for any findings.
Thanks!