From 29a11b84a29c0dd85f5b8bf5202d1e8b14924659 Mon Sep 17 00:00:00 2001 From: aacerox Date: Thu, 19 Oct 2023 23:18:34 +0200 Subject: [PATCH] refactor: add maxBodyLenght to request args (PR #192 ) --- lib/NrcConnectManager.js | 6 +++++- test/specs/TestRIOFacade.mjs | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/NrcConnectManager.js b/lib/NrcConnectManager.js index b47b9f5..21d0507 100644 --- a/lib/NrcConnectManager.js +++ b/lib/NrcConnectManager.js @@ -296,7 +296,11 @@ export class NrcConnectManager { * @param {*} options */ #configureOptions(options) { - const followRedirectsProps = ['followRedirects', 'maxRedirects']; + const followRedirectsProps = [ + 'followRedirects', + 'maxRedirects', + 'maxBodyLength', + ]; // add follows-redirects config followRedirectsProps.forEach((redirectProp) => { diff --git a/test/specs/TestRIOFacade.mjs b/test/specs/TestRIOFacade.mjs index 101bd99..78f78f1 100644 --- a/test/specs/TestRIOFacade.mjs +++ b/test/specs/TestRIOFacade.mjs @@ -291,10 +291,10 @@ describe('IO Facade', function() { }); after(function() { - server.close(); - // server will respond with ECONNRESET if we do not wait her + // server will respond with ECONNRESET if we do not wait here setTimeout(() => { + server.close(); console.log('server stopped'); - }, 500 ); + }, 1000 ); }); });