Creating Some Tests: Approaches
Get to know different approaches which can be used to test our application.
We'll cover the following...
What should be tested in this application, considering that tests require minimal work to develop and be maximally informative?
Approach 1
One approach might be to create a collection of tests, one for each API route and HTTP method, that double-check that the database has been properly updated. For example, when a letter is guessed, has the game progressed correctly? Has it correctly identified whether the game is won or lost? This idea is tempting because it seems to provide a means of assuring that each step is correct. I would disagree. To capture the complexity of the ...