Skip to content

Commit 64ce0b6

Browse files
committed
Made sure to await set calls
1 parent 49e8b76 commit 64ce0b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('Database@exp Tests', () => {
364364
child1: 'test1',
365365
child2: 'test2'
366366
};
367-
writeAndValidate(writerRef, readerRef, toWrite, ec);
367+
await writeAndValidate(writerRef, readerRef, toWrite, ec);
368368
const q = query(readerRef, limitToFirst(1));
369369
const snapshot = await get(q);
370370
const expected = {
@@ -382,7 +382,7 @@ describe('Database@exp Tests', () => {
382382
child3: 'test3'
383383
};
384384
let ec = EventAccumulatorFactory.waitsForExactCount(1);
385-
writeAndValidate(writerRef, readerRef, toWrite, ec);
385+
await writeAndValidate(writerRef, readerRef, toWrite, ec);
386386
ec = EventAccumulatorFactory.waitsForExactCount(1);
387387
const child1Ref = child(readerRef, 'child1');
388388
onValue(child1Ref, snapshot => {
@@ -423,7 +423,7 @@ describe('Database@exp Tests', () => {
423423
expect(snapshot.val()).to.deep.eq(toWrite);
424424
});
425425

426-
it('should test startAt get with listener only fires once', async () => {
426+
it.only('should test startAt get with listener only fires once', async () => {
427427
const db = getDatabase(defaultApp);
428428
const { readerRef, writerRef } = getRWRefs(db);
429429
const expected = {
@@ -432,7 +432,7 @@ describe('Database@exp Tests', () => {
432432
child3: 'test3'
433433
};
434434
const ec = EventAccumulatorFactory.waitsForExactCount(1);
435-
writeAndValidate(writerRef, readerRef, expected, ec);
435+
await writeAndValidate(writerRef, readerRef, expected, ec);
436436
const q = query(readerRef, orderByKey(), startAt('child2'));
437437
const snapshot = await get(q);
438438
const expectedQRes = {

0 commit comments

Comments
 (0)