wardbell / bardjs

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

bardInject error #3

Closed rodleviton closed 9 years ago

rodleviton commented 9 years ago

I am getting the following issue when using bard.inject().

beforeEach(function() {
        bard.appModule('myModule');
        bard.inject(this, '$controller', '$log', '$q', '$rootScope');
    });

TypeError: 'undefined' is not a function (evaluating 'getCtxFromArgs.bind(this)') at bardInject (/bower_components/bardjs/dist/bard.js:273)

Any help would be really appreciated.

tgoyer commented 9 years ago

I'm getting this same error. At line 273, When I:

console.log(getCtxFromArgs.bind);

I get:

 undefined

EDIT: Upon further analysis, it appears that Function.prototype.bind() is not implemented in PhantomJS.

2nd EDIT: Upon further further analysis, the other issue already documents all this. Disregard my rambling. Haha

wardbell commented 9 years ago

See duplicate issue: https://github.com/wardbell/bardjs/issues/2#issuecomment-97065168