(conflicts, sourceModel,
targetModel, done)
| 1907 | } |
| 1908 | |
| 1909 | function assertTargetModelEqualsSourceModel(conflicts, sourceModel, |
| 1910 | targetModel, done) { |
| 1911 | let sourceData, targetData; |
| 1912 | |
| 1913 | assert(conflicts.length === 0); |
| 1914 | async.parallel([ |
| 1915 | function(cb) { |
| 1916 | sourceModel.find(function(err, result) { |
| 1917 | if (err) return cb(err); |
| 1918 | |
| 1919 | sourceData = result; |
| 1920 | cb(); |
| 1921 | }); |
| 1922 | }, |
| 1923 | function(cb) { |
| 1924 | targetModel.find(function(err, result) { |
| 1925 | if (err) return cb(err); |
| 1926 | |
| 1927 | targetData = result; |
| 1928 | cb(); |
| 1929 | }); |
| 1930 | }, |
| 1931 | ], function(err) { |
| 1932 | if (err) return done(err); |
| 1933 | |
| 1934 | assert.deepEqual(sourceData, targetData); |
| 1935 | |
| 1936 | done(); |
| 1937 | }); |
| 1938 | } |
| 1939 | }); |
| 1940 | |
| 1941 | describe('Replication / Change APIs with custom change properties', function() { |
no test coverage detected
searching dependent graphs…