Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Jan 9, 2025
1 parent 7466ee7 commit 1f76162
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/helpers/__tests__/format-element.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ test('formatElement', () => {
Hello
</Text>"
`);
expect(formatElement(null)).toMatchInlineSnapshot(`"null"`);
expect(formatElement(null)).toMatchInlineSnapshot(`"(null)"`);
});
2 changes: 1 addition & 1 deletion src/helpers/format-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function formatElement(
{ compact, highlight = true, mapProps = defaultMapProps }: FormatElementOptions = {},
) {
if (element == null) {
return 'null';
return '(null)';
}

const { children, ...props } = element.props;
Expand Down
2 changes: 1 addition & 1 deletion src/matchers/__tests__/to-contain-element.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test('toContainElement() handles null element', () => {
does not contain:
null
(null)
"
`);
});
Expand Down

0 comments on commit 1f76162

Please sign in to comment.