Closed fhouser closed 3 months ago
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.
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