Joined May 2017
·
Posted to
Injecting Custom Services in an AngularJS Unit Test
over 1 year
ago
please mention the imports which are required ...as i tried injecting a service in a unit test of a pipe object creation, although your code works but I am unable to figure out the imports you have used.
Here's my code -
describe('InstrumentPipe', () => {
describe('InstrumentService', function () {
var createService;
// shows compiler error on "inject(function"
beforeEach(inject(function () {
var $injector = angular.injector(['../services/InstrumentService'])
// shows compiler error on "angular.injector"
});