In the following example test, the original provider name is APIEndpointProvider, but for injection and service instantiation the convention seems to be it has to be injected with underscores wrapping it. Why is that?
'use strict';
describe('Provider: APIEndpointProvider', function () {
beforeEach(module('myApp.providers'));
var APIEndpointProvider;
beforeEach(inject(function(_APIEndpointProvider_) {
APIEndpointProvider = _APIEndpointProvider_;
}));
it('should do something', function () {
expect(!!APIEndpointProvider).toBe(true);
});
});
What is the convention I'm missing a better explanation to?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…