You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders hello', () => {
render(<App />);
const appElement = screen.getByText('hello');
expect(appElement).toBeInTheDocument();
});
gets this error:
TestingLibraryElementError: Unable to find an element with the text: hello. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div />
</div>
</body>
12 | test('renders hello', () => {
13 | render(<App />);
> 14 | const appElement = screen.getByText('hello');
| ^
15 | expect(appElement).toBeInTheDocument();
16 | });
Version
36.12.0
Browser
Chrome
The text was updated successfully, but these errors were encountered:
Hi there! 👋 Going to close this out as it seems like the question has been answered and there aren't any additional steps to take. Feel free to comment if I'm missing something here!
Description
When I use Primer in React or NextJS, The unit tests are unable to locate anything inside of ThemeProvider.
Steps to reproduce
gets this error:
Version
36.12.0
Browser
Chrome
The text was updated successfully, but these errors were encountered: