From 4648b3e5de9e67c3626dd8b9c884d9b0c1ba3eef Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 16 Aug 2016 20:20:48 -0700 Subject: [PATCH] feat(testing): add TestBed.get --- modules/@angular/core/testing/test_bed.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/@angular/core/testing/test_bed.ts b/modules/@angular/core/testing/test_bed.ts index c341d9fdf4..95715343e4 100644 --- a/modules/@angular/core/testing/test_bed.ts +++ b/modules/@angular/core/testing/test_bed.ts @@ -130,6 +130,10 @@ export class TestBed implements Injector { return TestBed; } + static get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) { + return getTestBed().get(token, notFoundValue); + } + static createComponent(component: Type): ComponentFixture { return getTestBed().createComponent(component); }