From 573da027e57d6d91ada15d065d146d4861d74d89 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 9 May 2021 17:46:16 -0400 Subject: [PATCH] tests: Preserve query string when redirecting --- src/node/hooks/express/tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js index 4a732bc1c..96503fd5c 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -47,7 +47,7 @@ exports.expressCreateServer = (hookName, args, cb) => { }); args.app.get('/tests/frontend', (req, res) => { - res.redirect('./frontend/index.html'); + res.redirect(['./frontend/index.html', ...req.url.split('?').slice(1)].join('?')); }); return cb();