Skip to main content
Christopher Kollars

Jest and unit tests

Had to tackle a simple bug but seen the feature was using momentjs which we are trying to get away from in favor of date-fns.js. So I implement this with a helper method. Simple but it was something I needed to verify would work in other possible scenarios and not just the current implementation. I wrote some unit tests. Something I rarely do in javascript. I know it's bad but I just have a hard time doing so. This helped me realize it wasn't so scary and looking forward to writing more.