MCPcopy Index your code
hub / github.com/angular/angularfire / setup

Function setup

src/compat/firestore/collection/collection.spec.ts:180–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178
179 it('should handle multiple subscriptions (hot)', done => {
180 async function setup() {
181 const ITEMS = 4;
182 const { stocks } = await collectionHarness(afs, ITEMS);
183 const changes$ = TestBed.runInInjectionContext(() => stocks.snapshotChanges());
184 const sub = changes$.subscribe(() => undefined);
185 sub.add(
186 changes$.pipe(take(1)).subscribe(data => {
187 expect(data.length).toEqual(ITEMS);
188 sub.unsubscribe();
189 done();
190 })
191 );
192 }
193 setup()
194 });
195

Callers 1

collection.spec.tsFile · 0.85

Calls 3

addMethod · 0.80
collectionHarnessFunction · 0.70
snapshotChangesMethod · 0.65

Tested by

no test coverage detected