Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pipe: function (s) {
s.end('abc123');
// ensure 'finish' event fires after files are processed
process.nextTick(Busboy.prototype.on.withArgs('finish').args[0][1]);
},
truncated: true
afterEach(function () {
Busboy.prototype.on.restore();
});
beforeEach(function () {
parser = bodyparser();
req = {
headers: {
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryHsAjApiShDrW2RCB',
},
is: sinon.stub().returns(true),
pipe: sinon.stub()
};
res = {};
next = sinon.stub();
sinon.stub(Busboy.prototype, 'on');
});
attr: true
}
})
.concat(values(errors))
if (validationErrors.length) {
Busboy.prototype.emit.call(
this,
'error',
createValidationError(formatRamlErrors(validationErrors, 'form'))
)
return
}
}
return Busboy.prototype.emit.apply(this, arguments)
}
}