From b528c1edfe5106567203fcfcd4cbe699ef566225 Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Thu, 11 Jul 2024 16:46:41 +0100 Subject: [PATCH] strip whitespace from received lines --- pytest_pyodide/node_test_driver.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pytest_pyodide/node_test_driver.js b/pytest_pyodide/node_test_driver.js index ddf0e3c..aa19408 100644 --- a/pytest_pyodide/node_test_driver.js +++ b/pytest_pyodide/node_test_driver.js @@ -55,6 +55,12 @@ rl.on("line", async function (line) { return; } if (line !== cur_uuid) { + if(line.endsWith("\n")){ + line=line.substring(0,line.length()-1) + } + if(line.endsWith("\r")){ + line=line.substring(0,line.length()-1) + } if( line.trim() === ""){ cur_code += "\n"; }else{