Running jasmine tests with jasmine-jquery HTML fixtures in Google Chrome

I use Jasmine to test the Backbone code for the software behind Floodlight. My Handlebars templates for the Backbone views are in a separate file, included by the Django templates, which allows me to use the same templates when testing the Backbone views. To load the Handlebars templates for the Jasmine tests, I use the jasmine-jquery library.

This was working fine for me in Firefox, but I found that the tests were failing in Chrome.

It seems that the reason for this is that Chrome, by default, prevents JavaScript from loading local files. You can override this by starting Chrome with the --allow-file-access-from-files switch. This is the command that I run from my shell in Ubuntu:

google-chrome --allow-file-access-from-file

Here is the issue that describes this behavior and where I found the workaround. I found it through this blog post.