* Helper function to create an instance of a platform injector (that maintains the 'platform' * scope).
(providers: StaticProvider[] = [], name?: string)
| 99 | * scope). |
| 100 | */ |
| 101 | function createPlatformInjector(providers: StaticProvider[] = [], name?: string): Injector { |
| 102 | return Injector.create({ |
| 103 | name, |
| 104 | providers: [ |
| 105 | {provide: INJECTOR_SCOPE, useValue: 'platform'}, |
| 106 | {provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => (_platformInjector = null)])}, |
| 107 | ...providers, |
| 108 | ], |
| 109 | }); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Checks that there is currently a platform that contains the given token as a provider. |
no test coverage detected
searching dependent graphs…