Skip to content

Commit e6b8c93

Browse files
authored
(#8688) - test.issue3179: assert that conflicts exist
Co-authored-by: alxndrsn <alxndrsn>
1 parent 27ab3b2 commit e6b8c93

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/integration/test.issue3179.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
const should = require("chai").should();
4+
35
var adapters = [
46
['http', 'http'],
57
['http', 'local'],
@@ -44,6 +46,7 @@ adapters.forEach(function (adapters) {
4446
});
4547
}).then(function () {
4648
return local.get('1', {conflicts: true}).then(function (doc) {
49+
should.exist(doc._conflicts, 'conflicts expected, but none were found');
4750
return local.remove(doc._id, doc._conflicts[0]);
4851
});
4952
}).then(function () {
@@ -82,6 +85,7 @@ adapters.forEach(function (adapters) {
8285
return local.sync(remote);
8386
}).then(function () {
8487
return local.get('1', {conflicts: true}).then(function (doc) {
88+
should.exist(doc._conflicts, 'conflicts expected, but none were found');
8589
return local.remove(doc._id, doc._conflicts[0]);
8690
});
8791
}).then(function () {
@@ -180,6 +184,7 @@ adapters.forEach(function (adapters) {
180184
return waitForUptodate();
181185
}).then(function () {
182186
return local.get('1', {conflicts: true}).then(function (doc) {
187+
should.exist(doc._conflicts, 'conflicts expected, but none were found');
183188
return local.remove(doc._id, doc._conflicts[0]);
184189
});
185190
}).then(function () {
@@ -300,6 +305,7 @@ adapters.forEach(function (adapters) {
300305
return waitForUptodate();
301306
}).then(function () {
302307
return local.get('1', {conflicts: true}).then(function (doc) {
308+
should.exist(doc._conflicts, 'conflicts expected, but none were found');
303309
return local.remove(doc._id, doc._conflicts[0]);
304310
});
305311
}).then(function () {

0 commit comments

Comments
 (0)