#How to test my api in my medusa backend
21 messages · Page 1 of 1 (latest)
- Install thunderclient for vscode 2) Create new request 3) GET http://localhost:9000/store/products
I need to make them with jest
I don't know about jest, but the idea is the same
There is a detailed API reference with curl examples
There are also tons of examples in the medusa monorepo
I mean testing the code, where you create a test folder and run node run test to test your tests, not as such the endpoints from the postman.
Yes, check the test folders in the monorepo
https://github.com/medusajs/medusa/tree/develop/packages/medusa/src/api/routes/admin/store/__tests__
if I've been looking at it but when I run them I get an error, I don't know if it's because of the configuration of the tests in my project, I show you the error
u should take a video of u trying to run them along with the error and share any files u changed with openbin.dev
otherwise I have no error u are getting
OK a couple ov things.. 1. Have you used ts-jest
- The question I had is how did you get your medusa instance to fire up
If you can get the instance to start..you can use tools like super test to the test the api
Without having several mocks
Do you have to write the tests on js?