wardbell / bardjs

Spec helpers for testing angular v.1.x apps with Mocha, Jasmine and QUnit
MIT License
178 stars 34 forks source link

Unit testing with ng-html2js and Bard.js possible #35

Closed winnemucca closed 8 years ago

winnemucca commented 8 years ago

I have enjoyed using your library on personal projects and a project that I worked on before. In the past I have followed the gulp build from John Papa's hot towel generator to do the $templateCaching. However, in this project that I am working with I am trying to incorporate the preprocessor

_ng-html2js_. I am wondering if it is possible to combine this with the bardjs library?

I have not been able to configure the two together with any luck yet, but am not sure if it is with me or the code.

Here is my karma.config file

preprocessors: {
        '../Templates/**/*.html' : ['ng-html2js']
    },

    ngHtml2JsPreprocessor: {
        // setting this option will create only a single module that contains templates
        // from all the files, so you can load them all with  angular.mock.module('foo')

        stripPrefix: "Templates/",
        prependPrefix: "/",
        moduleName: 'templatesCached'
    },
bard.appModule('templatesCached');
bard.appModule('ha.module.core');

My error message is

Error: [$injector:modulerr] Failed to instantiate module function fakeRouteProvider($provide) due to:
TypeError: sinon.stub is not a function
    at new <anonymous>