unexpected-react-shallow icon indicating copy to clipboard operation
unexpected-react-shallow copied to clipboard

Is null not equal to null?

Open mg opened this issue 10 years ago • 1 comments

My element is rendering null, which is expected. Unexpected is failing it:

     UnexpectedError:
expected null to have rendered null
  No matching assertion, did you mean:

Am I doing something wrong or is null === null a special case that is not handled?

cheers, mg

mg avatar Oct 20 '15 22:10 mg

You're right, it's not handled when the getRenderOutput() returns null.

I'm fairly sure we can add this without any issues for the renderer - for the output, you can just use 'to be null', but we can probably add it anyway.

bruderstein avatar Oct 21 '15 05:10 bruderstein