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