appveyor-mocha
Version:
Logging mocha test results to AppVeyor
32 lines (24 loc) • 514 B
JavaScript
// Generated by CoffeeScript 1.12.2
/*
Post to AppVeyor Worker API
*/
(function() {
var api, http, url;
url = require('url');
http = require('http');
api = require('./api');
module.exports = function(data, path) {
var uri;
if (!api) {
return;
}
uri = url.parse(api);
data = JSON.stringify(data);
uri.method = 'POST';
uri.path = path;
uri.headers = {
'Content-Type': 'application/json'
};
return http.request(uri).end(data);
};
}).call(this);