-
Notifications
You must be signed in to change notification settings - Fork 0
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
Jest Testing #32
Comments
Key things to do for writing tests:
Note that for supertest, we needed to separate out the module To get the hard-coded input data, I would do the following: run the routes in Postman, returning the FULL response from the Docker/Prometheus API, before transforming it in whatever way the function demands. Use this as the "mock resolved value" for the relevant axios call. To get the hard-coded output data, I would just use the result from Postman, based on the aforementioned input. This only works if you already are confident your functions are doing what they are supposed to. |
No description provided.
The text was updated successfully, but these errors were encountered: