There was an error while loading. Please reload this page.
1 parent 6bfa48b commit fa7cbf9Copy full SHA for fa7cbf9
modules/angular2/test/di/injector_spec.js
@@ -262,6 +262,18 @@ export function main() {
262
expect(engineFromChild).toBe(engineFromParent);
263
});
264
265
+ it("should not use the child bindings when resolving the dependencies of a parent binding", function () {
266
+ var parent = new Injector([
267
+ Car, Engine
268
+ ]);
269
+ var child = parent.createChild([
270
+ bind(Engine).toClass(TurboEngine)
271
272
+
273
+ var carFromChild = child.get(Car);
274
+ expect(carFromChild.engine).toBeAnInstanceOf(Engine);
275
+ });
276
277
it('should create new instance in a child injector', function () {
278
var parent = new Injector([Engine]);
279
var child = parent.createChild([
0 commit comments