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

[Request]: Unit testing and its setup should be well documented. #2166

Closed
fhouser opened this issue Aug 3, 2024 · 1 comment
Closed

[Request]: Unit testing and its setup should be well documented. #2166

fhouser opened this issue Aug 3, 2024 · 1 comment

Comments

@fhouser
Copy link

fhouser commented Aug 3, 2024

Summary

The documentation for unit testing is severely neglected.
See --> Unit Testing

Jest is not the issue, but rather the setup, configuration, and instantiation of a testable Strapi app.

This documentation is missing and should be prioritized even before Strapi v5 is released.

Why is it needed?

The current unit testing documentation Unit Testing does not lead to a working base configuration. See the linked/related issue for the types of errors experienced.

Suggested solution(s)

No response

Related issue(s)/PR(s)

#7811

@pwizla
Copy link
Collaborator

pwizla commented Aug 5, 2024

Thank you very much for reporting this, @fhouser.

I will close this request as it is a duplicate of other ones referenced in the meta issue #1940.

In the meantime, feel free to read the following blog post about testing with Jest and Supertest: https://strapi.io/blog/automated-testing-for-strapi-api-with-jest-and-supertest. If it's not working with Strapi v4, we'll ask the original author to update it.

@pwizla pwizla closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants