Testing a Browserify project with Jasmine and Grunt
The WordPress theme for this site has been built (read: over-engineered) with Browserify and React. Most of it is pretty straightforward, but the widgets on the right are a little more complicated. I’ve only just started working with Browserify in general, so I had a relatively difficult time setting up a workflow for testing some of my modules. If you’re unaware, Browserify works by bundling up all of your CommonJS modules and any modules in your node_modules folder for easy use throughout your application using
require. You provide the entry point to your application, and Browserify will step through all of the
grunt test from the command line and have all my specs run as per usual.