diff --git a/src/test/test.js b/src/test/test.js index 29ff605601..81c6d36701 100644 --- a/src/test/test.js +++ b/src/test/test.js @@ -3199,6 +3199,7 @@ describe('Floccus', function() { await withSyncConnection(account1, async() => { console.log('Syncing account 1') console.log('Starting sync with account 2') + let error sync2 = account2.sync() sync2.then(() => { console.log('Finished sync with account 2') @@ -3206,11 +3207,18 @@ describe('Floccus', function() { }) await new Promise(resolve => setTimeout(resolve, 60000)) expect(account2.getData().error).to.be.not.ok - expect(resolved).to.equal(false) + expect(account2.getData().scheduled).to.be.true + expect(resolved).to.equal(true) }) console.log('Finished sync with account 1') + sync2 = account2.sync() + sync2.then(() => { + console.log('Finished sync with account 2') + resolved = true + }) await new Promise(resolve => setTimeout(resolve, 60000)) expect(account2.getData().error).to.be.not.ok + expect(account2.getData().scheduled).to.be.false expect(resolved).to.equal(true) }) it('should propagate edits using "last write wins"', async function() {