Skip to content

Commit 49e8b76

Browse files
committed
Fixed test
1 parent 186977d commit 49e8b76

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/database/test/exp/integration.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,13 @@ describe('Database@exp Tests', () => {
381381
child2: 'test2',
382382
child3: 'test3'
383383
};
384-
const ec = EventAccumulatorFactory.waitsForExactCount(1);
384+
let ec = EventAccumulatorFactory.waitsForExactCount(1);
385385
writeAndValidate(writerRef, readerRef, toWrite, ec);
386+
ec = EventAccumulatorFactory.waitsForExactCount(1);
387+
const child1Ref = child(readerRef, 'child1');
388+
onValue(child1Ref, snapshot => {
389+
ec.addEvent(snapshot);
390+
});
386391
const otherChildrenQuery = query(
387392
readerRef,
388393
orderByKey(),
@@ -392,6 +397,8 @@ describe('Database@exp Tests', () => {
392397
child2: 'test2',
393398
child3: 'test3'
394399
};
400+
const [child1Snapshot] = await ec.promise;
401+
expect(child1Snapshot.val()).to.eq('test1');
395402
const snapshot = await get(otherChildrenQuery);
396403
expect(snapshot.val()).to.deep.eq(expected);
397404
});

0 commit comments

Comments
 (0)