As I was doing the final Quality Assurance Project one thought crossed my mind.
Testing with Chai is not particularly hard for me, and while it doesn’t seem extremely valuable to me at the moment due to the relative simplicity of the projects, I am guessing, that testing will become more and more useful as projects get more and more complex.
So with regards to that:
Which one of the two is better/more useful? Is there even a clear answer to this?
// #1 assert.equal(exampleText, "Is a string") // #2 assert.isString(exampleText) assert.equal(exampleText, "Is a string")
Or in other words, is it better to test for more, or is it better to make more compact tests?
Edit: The specific reason why I’m asking is, that I don’t really know sometimes what exactly to test for. If I see that my application basically works as I want it too, I mostly just write extremely simple tests, like in the first example.
Curious to hear some thoughts on this.