Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
100 views
in Technique[技术] by (71.8m points)

javascript - Can I test an API call originated at the server level?

This might be a very dumb question, but I'm going to try.

I have a React app with an API that can be access to the frontend, imagine this:

/api/quotes/1

That endpoint sends another request to an external API and retrieves a quote with the ID 1.

I'm interested in testing the request from the server-side API call (method, params used etc). I'm using Jest for this project, but I'm not sure how to tackle this one. If you have a past example, or documentation, it's going to be more than appreciated. :)

question from:https://stackoverflow.com/questions/65871504/can-i-test-an-api-call-originated-at-the-server-level

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...