From 979dff8288c2f83eac8020a1dec0b3783b7e1476 Mon Sep 17 00:00:00 2001 From: Kavi Gupta Date: Sat, 31 Aug 2024 20:31:15 -0400 Subject: [PATCH] some console printing --- react/test/mapper_test.js | 6 +++++- react/test/test_utils.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/react/test/mapper_test.js b/react/test/mapper_test.js index e11623485..847dbf778 100644 --- a/react/test/mapper_test.js +++ b/react/test/mapper_test.js @@ -4,7 +4,11 @@ import { TARGET, download_or_check_string, most_recent_download_path, screencap const fs = require('fs'); async function check_geojson(t, path) { - await download_or_check_string(t, fs.readFileSync(most_recent_download_path(), 'utf8'), path); + const most_recent_download_path = most_recent_download_path(); + console.log("Most recent download: " + most_recent_download_path); + const most_recent_download = fs.readFileSync(most_recent_download_path, 'utf8'); + console.log("Most recent download: " + most_recent_download); + await download_or_check_string(t, most_recent_download, path); } fixture('mapping') diff --git a/react/test/test_utils.js b/react/test/test_utils.js index da89ca6df..8ed65a33c 100644 --- a/react/test/test_utils.js +++ b/react/test/test_utils.js @@ -106,6 +106,7 @@ export function most_recent_download_path() { const files = fs.readdirSync(downloadsFolder()); const sorted = files.map(x => path.join(downloadsFolder(), x)).sort((a, b) => fs.statSync(b).mtimeMs - fs.statSync(a).mtimeMs); + console.log("Most recent download: " + sorted[0]); return sorted[0]; }