MCPcopy Index your code
hub / github.com/share/sharedb / expectError

Function expectError

test/client/doc.js:557–564  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

555
556 var count = 0;
557 function expectError(code) {
558 count++;
559 return function(error) {
560 expect(error.code).to.equal(code);
561 count--;
562 if (!count) next();
563 };
564 }
565
566 doc.on('error', expectError('ERR_HARD_ROLLBACK_FETCH_FAILED'));
567 doc.submitOp(nonInvertibleOp, expectError('SUBMIT_ERROR'));

Callers 1

doc.jsFile · 0.85

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…