Fix Hurst fetch URL to use full API_BASE_URL and ensure endpoint returns JSON for all query params

This commit is contained in:
DiTus
2026-03-18 22:37:42 +01:00
parent 8bb61e014d
commit 79802aa173
1147 changed files with 141293 additions and 14 deletions

37
node_modules/union/test/after-test.js generated vendored Normal file
View File

@ -0,0 +1,37 @@
var assert = require('assert'),
vows = require('vows'),
request = require('request'),
union = require('../');
function stream_callback(cb) {
return function () {
var stream = new union.ResponseStream();
stream.once("pipe", function (req) {
return cb ? cb(null,req) : undefined;
});
return stream;
};
}
vows.describe('union/after').addBatch({
'When using `union`': {
'a union server with after middleware': {
topic: function () {
var self = this;
union.createServer({
after: [ stream_callback(), stream_callback(self.callback) ]
}).listen(9000, function () {
request.get('http://localhost:9000');
});
},
'should preserve the request until the last call': function (req) {
assert.equal(req.req.httpVersion, '1.1');
assert.equal(req.req.url, '/');
assert.equal(req.req.method, 'GET');
}
}
}
}).export(module);