Skip to content

Commit

Permalink
Merge pull request #662 from share/create-test-fix
Browse files Browse the repository at this point in the history
✅ Fix create resubmit test
  • Loading branch information
alecgibson authored Jun 11, 2024
2 parents 7abe650 + 75b2a14 commit 3cdecf4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/client/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,15 @@ module.exports = function() {
next();
});

var doc = connection.get('dogs', 'fido');
doc.create({age: 3}, function(error) {
expect(doc.version).to.equal(1);
done(error);
var count = 0;
backend.use('reply', function(message, next) {
next();
if (message.reply.a === 'op') count++;
if (count === 2) done();
});

var doc = connection.get('dogs', 'fido');
doc.create({age: 10}, errorHandler(done));
});

it('does not fail when resubmitting a create op on a doc that was deleted', function(done) {
Expand Down

0 comments on commit 3cdecf4

Please sign in to comment.