Skip to content

Commit

Permalink
chore(react): Add ts-ignore for fallback tests (#4004)
Browse files Browse the repository at this point in the history
Some tests are testing behaviour when we pass the wrong type
on purpose. We should make sure we ts-ignore in those cases.
  • Loading branch information
AbhiPrasad authored Sep 23, 2021
1 parent 27f8609 commit d920532
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react/test/errorboundary.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('ErrorBoundary', () => {

it('renders null if not given a valid `fallback` prop', () => {
const { container } = render(
// @ts-ignore Passing wrong type on purpose
<ErrorBoundary fallback="Not a ReactElement">
<Bam />
</ErrorBoundary>,
Expand All @@ -90,6 +91,7 @@ describe('ErrorBoundary', () => {

it('renders null if not given a valid `fallback` prop function', () => {
const { container } = render(
// @ts-ignore Passing wrong type on purpose
<ErrorBoundary fallback={() => 'Not a ReactElement'}>
<Bam />
</ErrorBoundary>,
Expand Down

0 comments on commit d920532

Please sign in to comment.