Thursday 18 October 2018

Good Jest examples for testing an API?

Hi, I want to get more in the habit of writing tests for my applications.​I've looked at a lot of tutorials on medium, and youtube and found some good examples of how to use Jest, (and also their documentation was really helpful and well written), but I still can't find good examples of how to write tests for real applications. Most of the tests I've found were pretty simple, and small files where everything is in 1 file which makes it easy to test.​However, I'd like to see examples of projects that use jest for testing an API where the API actually makes a call to a database or something.​I've looked through github repos of google and facebook, and I've found some examples of how they test their code, but not all examples use jest, and not all examples involve testing API calls.​So I was wondering if anyone could show me some examples of repos that use jest to test code that relies on other dependencies/APIs.

Submitted October 18, 2018 at 04:04PM by ns_helloworld

No comments:

Post a Comment