Skip to content

Commit

Permalink
fix: import path for jest-dom helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin-jw committed Oct 16, 2023
1 parent 6039560 commit 79fd3e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion __tests__/404.test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
import { FilterProvider } from '../context/FilterContext';
import { ViewProvider } from '../context/ViewContext';
import PageNotFound from '../pages/404';
Expand Down
10 changes: 6 additions & 4 deletions __tests__/[id].test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
import { FilterProvider } from '../context/FilterContext';
import { ViewProvider } from '../context/ViewContext';
import apiService from '../services/apiService';
Expand Down Expand Up @@ -30,10 +30,12 @@ describe('DetailPage', () => {
<FilterProvider>
<DetailPage fetchedTeamMember={MOCK_TEAM_MEMBER} />
</FilterProvider>
</ViewProvider>,
</ViewProvider>
);

await waitFor(() => expect(screen.getByText('Aragorn Elessar II')).toBeInTheDocument());
await waitFor(() =>
expect(screen.getByText('Aragorn Elessar II')).toBeInTheDocument()
);
});
});

Expand Down Expand Up @@ -68,7 +70,7 @@ describe('getServerSideProps', () => {
cohortParticipant: 'fellowship',
},
},
}),
})
);
});
});

0 comments on commit 79fd3e2

Please sign in to comment.