MCPcopy
hub / github.com/strongloop/loopback / verifyInstanceWasReplicated

Function verifyInstanceWasReplicated

test/replication.test.js:1873–1889  ·  view source on GitHub ↗
(source, target, id)

Source from the content-addressed store, hash-verified

1871 }
1872
1873 function verifyInstanceWasReplicated(source, target, id) {
1874 return function verify(next) {
1875 source.findById(id, function(err, expected) {
1876 if (err) return next(err);
1877
1878 target.findById(id, function(err, actual) {
1879 if (err) return next(err);
1880
1881 expect(actual && actual.toObject())
1882 .to.eql(expected && expected.toObject());
1883 debug('replicated instance: %j', actual);
1884
1885 next();
1886 });
1887 });
1888 };
1889 }
1890
1891 function spyAndStoreSinceArg(Model, methodName, store) {
1892 const orig = Model[methodName];

Callers 3

Calls 1

nextFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…