MCPcopy Index your code
hub / github.com/angular/angular / configTestBed

Function configTestBed

packages/service-worker/test/provider_spec.ts:50–67  ·  view source on GitHub ↗
(options: SwRegistrationOptions)

Source from the content-addressed store, hash-verified

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'});

Callers 1

provider_spec.tsFile · 0.85

Calls 5

provideServiceWorkerFunction · 0.90
untilStableFunction · 0.85
waitForReadyToRegisterFunction · 0.85
registerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…