UNPKG

mocha-apiary-reporter

Version:

Generate API documentation using Apiary's Blueprint style, then plug it right into apiary.io to get beautiful docs!

25 lines (22 loc) 477 B
var fs = require('fs'); var capture = require('../capture'); exports.write = function(buffer) { capture.add({ request: { data: buffer } }); return this.__shimmed.write.call(this, buffer); }; exports.attach = function(field, path, name) { capture.add({ request: { files: [{ name: name, path: path, content: fs.readFileSync(path) }] } }); return this.__shimmed.attach.call(this, field, path, name); };