Well guys, I learned a cool new thing today! Did you know about the "it.only" syntax in mocha? Can you believe I just discovered it today?! Yep, my life has forever changed for the better now that I'm aware of in.only, and since you're reading this post right now I hope it will change yours too!
It's really not that complicated at all. Instead of writing "it" in your code, you just run "it.only"! For example, the code below will only run the test, "should do some cool stuff!".
Now, you can toggle on / off a single test to be run with O(1) changes your code so you can focus on kicking ass and writing tests. Happy coding!
I just wanted to give a shoutout to Jake Trent and his blog post about mocha's it.only which made me aware of this nifty thing in the first place. Thanks Trent!
Your comment will be posted after it is approved.
Leave a Reply.
The posts on this site are written and maintained by Jim Lynch. About Jim...