Skip to content

Instantly share code, notes, and snippets.

@abruzzi
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abruzzi/9167584 to your computer and use it in GitHub Desktop.
Save abruzzi/9167584 to your computer and use it in GitHub Desktop.
Fix Jamine-jquery fixtures bug in karma

Put this to karma.conf.js

{
    // list of files / patterns to load in the browser
    files: [
        {pattern: 'scripts/**/*.js', included: false},
        {pattern: 'scripts/**/*.html', served: true, included: false},
        {pattern: 'tests/**/*.js', included: false}
    ]

    preprocessors : [{'scripts/**/*.html' : ''}],
    //...
}

and in you spec:

beforeEach(function(){
    var fixtures  = jasmine.getFixtures();

    jasmine.getFixtures().fixturesPath = 'base/spec/fixtures/';
    fixtures.load('templ.html');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment