This site runs best with JavaScript enabled.

My favourite VS Code extensions for writing tests in Cypress

Filip Hric

September 11, 2020


That’s what we needed, right? Another VS code extension blog 😂 But I guess I got your attention, so why not share a little bit of my workflow? This one is for all you testers and developers writing tests in Cypress.

Add .only

Here’s to the lazy ones among us 🍻 Add .only extension does exactly what it claims to do. It filters your test by adding .only keyword to your it() block. It’s about 1 second faster than typing it yourself. Use that time well.

ES6 Mocha Snippets

This plugin actually saves you more than 1 second, and maybe even a couple of minutes. Depends on how many tests you write. These snippets help you create a quick describe() or it() block, and can create a combination of these two for you. You can quickly create a before() or beforeEach() hook. And after() too. But don’t use that one.

Fold plus

With many tests in one spec, you might want to look into just the names of your tests. If you wan’t to fold all your it() blocks, you might find Fold plus extension really useful. Works something like this.

Bracket pair colorizer

With all the different code blocks, it is easy to get lost in all the brackets. If you are like me, and like to move stuff around, chances are you will forget a bracket pair spend couple of days trying to find out which one is missing (or extra). With highlighting code blocks, it may take a little less.

vscode-icons

Just a nice little addition to your VS code. To keep things organized different folders get different icons. Cypress-related files and folder get a nice little Cypress icon, so you can find them more easily.

VS Code icons

Share article
Cypress test automation course
If you like my articles, you’re going to love my new course on Cypress.io. It’s called Cypress test automation for people in a hurry, and it is exactly what you’d expect. A compact, fast and straight-to-the-point course with lots of practical examples and challenges. Check it out!

More articles coming! Get them to your inbox ✉️



Filip Hric © 2020