If I want to test a component with external templates, I need to reach into Angular's privates to override the XHR provider (nee di binding):
import {XHR} from 'angular2/src/core/compiler/xhr';
import {XHRImpl} from 'angular2/src/core/compiler/xhr_impl';
…
beforeEachBindings(() => {
return bind(XHR).toClass(XHRImpl);
});
The default is useful only for testing Angular Compiler but not for testing Angular applications, so we should change this so that by default the XHR service is not mocked out and only in the Angular core suite we override the provider with mock.
cc: @wardbell @johnpapa
If I want to test a component with external templates, I need to reach into Angular's privates to override the XHR provider (nee di binding):
The default is useful only for testing Angular Compiler but not for testing Angular applications, so we should change this so that by default the XHR service is not mocked out and only in the Angular core suite we override the provider with mock.
cc: @wardbell @johnpapa