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.
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!
One of your examples in section 3 has a missing quote mark, which throws off syntax highlighting completely.
Wow, nice catch! Thanks. I've amended the article.
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!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.