We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
applyPatches.complete
1 parent c45c703 commit 66057e6Copy full SHA for 66057e6
test/patch/apply.js
@@ -534,6 +534,26 @@ describe('patch/apply', function() {
534
+ 'foo5\n'
535
};
536
537
+ it('should handle errors on complete', function(done) {
538
+ const expected = new Error();
539
+
540
+ applyPatches(patch, {
541
+ loadFile(index, callback) {
542
+ callback(undefined, contents[index.index]);
543
+ },
544
+ patched(index, content, callback) {
545
+ callback(expected);
546
547
+ complete(err) {
548
+ expect(err)
549
+ .to.equal(expected)
550
+ .to.not.be.undefined;
551
552
+ done();
553
+ }
554
+ });
555
556
557
it('should handle multiple files', function(done) {
558
applyPatches(patch, {
559
loadFile(index, callback) {
0 commit comments