MDWxrd Unit Tests Update 2

In sublime text, I tend to just control open (CTRL+O) from "src/App.svelte" (which is my preferred landing spot, but whatever your project uses is fine too) and type "spec" into the search box to find all my jest spec files (I use .spec.js postfix for all test files as a convention for this convenience).

Doing that, led me to realize that only Djehuti.spec.js exists, and so I'm going to create a placeholder for both Wxrd.js and MDWxrd.js, in Sublime Text I just control shift save to "save as..." from Djehuti.spec.js into first Wxrd.js, removing everything but the stubs, and then I save as again into MDWxrd.spec.js to generate another stub for those tests.

Yeah this is a slower process but we are building a rock solid foundation that can be expanded into a useful net designed to catch issues before they become issues so I am a huge advocate for taking the time to add stubs for unit tests at the very least, so its there from the start and can be built upon whenever the situation makes a good argument for it (get the heavy lifting out of the way when the project is small, so it's wired up for us later on ;)

Comments

Popular Posts