I'm trying to build some tests in karma for an Angular app, and I am dabbling in ES6. I am trying to use arrow functions instead of the old format, but I am getting an error when I try to pass a function with multiple params into the inject function.
This works fine:
it('this is a test', () => {
.....
});
This throws 'TypeError: Cannot read property '1' of null':
it('this is another test',inject(($state, $q, $httpBackend)=> {
....
});
although this works fine:
it('this is another test',inject(function($state, $q, $httpBackend) {
....
});
Any thoughts on why this would be? Thanks a bunch.