Vite and Cypress are fantastic, but I bet you already know that. The lowest “satisfaction” rating Cypress has ever received in a ‘The State of JS’ survey is 92%. In the latest survey, Vite took home awards for ‘Highest Satisfaction’ (97.4%) and ‘Highest Interest’ (83%).
It’s clear why. Vite is a blazing fast feature-rich build tool from the creator Vue. Cypress is a versatile test runner which supports a surprising amount of browser test runners, continuous integration, time-travel debugging, and more.
Today I’m going to explain how to preprocess your Cypress unit tests with Vite because, well, I had to figure it out and no one has written about it yet.