Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace fetch mock with jest fetch mock #11850

Merged
merged 12 commits into from
Aug 19, 2024

Conversation

karinathomasbbc
Copy link
Contributor

@karinathomasbbc karinathomasbbc commented Aug 15, 2024

Overall changes

Replaces references of the fetch-mock library with jest-fetch-mock as fetch-mock requires ESM support

Code changes

Replace references of fetch-mock with jest-fetch-mock and update tests accordingly

Testing

This affects unit tests only, so no manual testing required

Unit tests all passing as expected

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

@karinathomasbbc karinathomasbbc self-assigned this Aug 15, 2024
Copy link
Contributor Author

@karinathomasbbc karinathomasbbc Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: I have deleted this test because all of the tests were skipped (and I didn't want to have to fix the fetch-mock issue if I didn't need to)

Copy link
Contributor Author

@karinathomasbbc karinathomasbbc Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: I have deleted this test because all of the tests were skipped (and I didn't want to have to fix the fetch-mock issue if I didn't need to)

@@ -362,78 +341,11 @@ describe('Routes', () => {
).toBeInTheDocument();
});

it('should route to and render a photo gallery page', async () => {
Copy link
Contributor Author

@karinathomasbbc karinathomasbbc Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: I have deleted this test because photo gallery pages are now routed to the article page

).toBeInTheDocument();
});

it('should route to and render a story page', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: I have deleted this test because story pages are now routed to the article page

@karinathomasbbc karinathomasbbc marked this pull request as ready for review August 16, 2024 10:50
Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Thanks for removing the older page type tests. We'll get around to deleting all of that code soon hopefully!

@karinathomasbbc
Copy link
Contributor Author

Looks good 👍 Thanks for removing the older page type tests. We'll get around to deleting all of that code soon hopefully!

@amoore108 I did see a branch with all these deletions in it, so I hope this won't cause a merge conflict 😬 - I am sure we can figure it out then!

Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@karinathomasbbc karinathomasbbc merged commit a01d001 into latest Aug 19, 2024
11 checks passed
@karinathomasbbc karinathomasbbc deleted the replace-fetch-mock-with-jest-fetch-mock branch August 19, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants