mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-19 01:25:06 +00:00
fix users.test.jsx
Allow for ErrorBoundary message rendering so that the test does not fail expecting exact match
This commit is contained in:
parent
9d08305dcb
commit
1deea473ea
1 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ describe('UsersPage', () => {
|
|||
|
||||
const { container } = render(<UsersPage />);
|
||||
|
||||
expect(screen.getByText('Something went wrong')).toBeInTheDocument();
|
||||
expect(screen.getByText(/Something went wrong/)).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('users-table')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ describe('UsersPage', () => {
|
|||
const { container } = render(<UsersPage />);
|
||||
|
||||
// id: 0 is falsy, so should render empty
|
||||
expect(screen.getByText('Something went wrong')).toBeInTheDocument();
|
||||
expect(screen.getByText(/Something went wrong/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('switches from unauthenticated to authenticated state', () => {
|
||||
|
|
@ -47,7 +47,7 @@ describe('UsersPage', () => {
|
|||
|
||||
render(<UsersPage />);
|
||||
|
||||
expect(screen.getByText('Something went wrong')).toBeInTheDocument();
|
||||
expect(screen.getByText(/Something went wrong/)).toBeInTheDocument();
|
||||
|
||||
useAuthStore.mockReturnValue({ id: 1 });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue