8000 fix: update minimum node version to 16 · podium-lib/node-http-proxy-fork@59d0e9a · GitHub
[go: up one dir, main page]

Skip to content

Commit 59d0e9a

Browse files
committed
fix: update minimum node version to 16
1 parent be44d8f commit 59d0e9a

File tree

2 files changed

+1
-48
lines changed

2 files changed

+1
-48
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install Node.js
2828
uses: actions/setup-node@v4
2929
with:
30-
node-version: 14
30+
node-version: 16
3131

3232
- name: Install dependencies
3333
run: npm install

test/lib-http-proxy-passes-web-incoming-test.js

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -253,53 +253,6 @@ describe('#createProxyServer.web() using own http server', function () {
253253
}, function() {}).end();
254254
});
255255

256-
it('should proxy the request and handle timeout error', function(done) {
257-
var proxy = httpProxy.createProxyServer({
258-
target: 'http://127.0.0.1:45001',
259-
timeout: 100
260-
});
261-
262-
require('net').createServer().listen(45001);
263-
264-
var proxyServer = http.createServer(requestHandler);
265-
266-
var cnt = 0;
267-
var doneOne = function() {
268-
cnt += 1;
269-
if(cnt === 2) done();
270-
}
271-
272-
var started = new Date().getTime();
273-
function requestHandler(req, res) {
274-
proxy.once('econnreset', function (err, errReq, errRes) {
275-
proxyServer.close();
276-
expect(err).to.be.an(Error);
277-
expect(errReq).to.be.equal(req);
278-
expect(errRes).to.be.equal(res);
279-
expect(err.code).to.be('ECONNRESET');
280-
doneOne();
281-
});
282-
283-
proxy.web(req, res);
284-
}
285-
286-
proxyServer.listen('8085');
287-
288-
var req = http.request({
289-
hostname: '127.0.0.1',
290-
port: '8085',
291-
method: 'GET',
292-
}, function() {});
293-
294-
req.on('error', function(err) {
295-
expect(err).to.be.an(Error);
296-
expect(err.code).to.be('ECONNRESET');
297-
expect(new Date().getTime() - started).to.be.greaterThan(99);
298-
doneOne();
299-
});
300-
req.end();
301-
});
302-
303256
it('should proxy the request and provide a proxyRes event with the request and response parameters', function(done) {
304257
var proxy = httpProxy.createProxyServer({
305258
target: 'http://127.0.0.1:8080'

0 commit comments

Comments
 (0)
0