Echo JS 0.11.0

<~>
joncys 1723 days ago. link 1 point
Start with an integration test (do an actual API request, expect it to return some data).

Start writing smaller unit tests for functions, that will be composed into the routine that gets the request -> serves the response. That way, you'll think about breaking things apart and will have small modules / functions to test.

Presto! You have a bunch of unit tests and one integration test, that pretty much covers the testing trophy paradigm. Oh, and if you'll write tests first, you're doing TDD now.

Replies