bardjs icon indicating copy to clipboard operation
bardjs copied to clipboard

Failed to instantiate module function fakeRouteProvider

Open realph opened this issue 9 years ago • 0 comments

So, I've also watched your unit testing course on Pluralsight and this is basically an identical question to this. I'm getting this error when running my tests:

[$injector:modulerr] Failed to instantiate module function fakeRouteProvider($provide) due to: TypeError: sinon.stub is not a function at new (/Users/realph/../../../node_modules/bardjs/dist/bard.js:389:31)

Sorry for sounding stupid, but maybe I've placed my bard.js files in the wrong place. I'm just running my tests in the console for now with:

karma start karma.conf.js

I've installed bardjs via npm and am including it in my karma.conf.js file like this:

frameworks: ['mocha', 'chai', 'sinon', 'chai-sinon'],

files: [
  ...

  '../../node_modules/sinon/lib/sinon.js',
  '../../node_modules/bardjs/dist/bard.js',

  ...
],

Am I doing something wrong that would be causing this error?

Any help is appreciated. Thanks in advance!

realph avatar Nov 20 '15 12:11 realph