Bundles of Karma

Setting up bundling in Aurelia (as simple as following the skeleton navigation’s latest update) has decreased my load time to a fraction of what it was before, really impressive! I also like how they separated the bundles from the bundling – as we have a new bundles.js file to hold everything that we’re (you guessed it) bundling.

However, after creating my bundle, I hit a snag when testing my application. Karma was looking for the aurelia-[*] bundle file, resulting in a 404:


A workaround is to call ‘unbundle’ before running the ‘gulp test’. This means we need a new gulp task in our test.js file (thanks to @tomtomau for the idea on this):


By firing off ‘gulp run-tests‘ we can see our tests are now back up and running.





Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s