amplify icon indicating copy to clipboard operation
amplify copied to clipboard

[tests] Update integration tests to not make a real API calls

Open gdomingu opened this issue 3 years ago • 0 comments

Simulate API requests for tests so that credits aren’t used

Right now we are making a real API call when our integration tests run. This will start to cost real money when we switch over to Cicero API.

To reduce the cost, we could use one one of the following strategies:

  1. Record the responses and store it in a file. The subsequent calls will use the recorded response. (Similar to VCR gem in rails).
  2. Stub or mock out the responses.

TBD - is there a testing library for node apps that might help with this?

Checklist

🖼️: Front-end ⚙️: Back-end 🏗️: Architecture

  • [x] 🏗️⚙️ Mock endpoints for requests in the tests.
  • [ ] #483

gdomingu avatar Aug 17 '22 19:08 gdomingu