Once upon a time, when I started writing tests long time ago (actually, not that long, maybe a few years ago), I was a naive young man. I hate bugs...
For further actions, you may consider blocking this person and/or reporting abuse
Love your writing style! It kept me interested all the way though. The lessons are great too!
Thanks! It means a lot since I just started writing two months ago, and I've kind of been shooting in the dark here. Glad that you like it. If you do have any feedback, do send them my way. Thanks, again.
I would argue that testing constructor that only assigns private initial value is unnecessary, seeing how you're testing methods that work with that value. After all, it doesn't matter what's going on inside a class if the output is correct.
You have a point. I've mentioned in the article, maybe if the constructor function has some logic, it can be tested and asserted as well. But true that, in the example I've given, testing the constructor itself might not mean that much, just putting it there.
Very nice write up. These lessons are the exact same one's I'm driving into my Quality Engineers.
I'll be sharing this article with them.
Cheer!
Thanks for the article! There's some good testing tips in here that I'll definitely be keeping in mind with my next project 👍
Glad to hear that!
Can relate to having those awkward testing skills 😅 Glad you learned along the way! And thanks for sharing them to us here 👍
Write tests first!
Nice article.
Wow, nice catch! Thanks. I've amended the article.