Skip to content
Discussion options

You must be logged in to vote

I guess you want to do something like this?

describe('MyLayout', () => {
    it('renders the footnote', () => {
        render(MyLayout(<div>Dummy</div>)); // <-- render MyLayout here.

        const footnote = screen.getByText('Footnote');
        expect(footnote).toBeInTheDocument();
        expect(screen.getByText(/dummy/i)).toBeInTheDocument();
    });
});

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@ver1fy
Comment options

@icyJoseph
Comment options

@ver1fy
Comment options

@icyJoseph
Comment options

@ver1fy
Comment options

Answer selected by ver1fy
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants