(options: SwRegistrationOptions)
| 48 | |
| 49 | describe('register', () => { |
| 50 | const configTestBed = async (options: SwRegistrationOptions) => { |
| 51 | if (apiFnName === provideServiceWorkerApi) { |
| 52 | TestBed.configureTestingModule({ |
| 53 | providers: [ |
| 54 | provideServiceWorker('sw.js', options), |
| 55 | {provide: PLATFORM_ID, useValue: 'browser'}, |
| 56 | ], |
| 57 | }); |
| 58 | } else { |
| 59 | TestBed.configureTestingModule({ |
| 60 | imports: [ServiceWorkerModule.register('sw.js', options)], |
| 61 | providers: [{provide: PLATFORM_ID, useValue: 'browser'}], |
| 62 | }); |
| 63 | } |
| 64 | |
| 65 | await untilStable(); |
| 66 | await waitForReadyToRegister(); |
| 67 | }; |
| 68 | |
| 69 | it('sets the registration options', async () => { |
| 70 | await configTestBed({enabled: true, scope: 'foo', updateViaCache: 'all', type: 'classic'}); |
no test coverage detected
searching dependent graphs…