http://kuukkanen.i2p/posts/testing
With
them, you are going to test how the 3rd-party dependencies and your own code
work together. Let’s test the user creation logic. test ( "create user integration" , async () => { // Create a new user. expect ( await fetch ( "/api/user" , { method : "POST" , body : JSON . stringify ({ name : "user" , password : "password1234" , }), }). status , ). toBe ( 200 ); // Invalid request. expect ( await fetch (...