diff --git a/run_accords_testing.sh b/run_accords_testing.sh index 5b91b7b..16243bf 100755 --- a/run_accords_testing.sh +++ b/run_accords_testing.sh @@ -1,4 +1,2 @@ -NODE_ENV=test -# npx next build | tee ./testing_logs/$(date +"%Y-%m-%d---%H-%M-%S").log - -npx next build 2> >(tee ./testing_logs/$(date +"%Y-%m-%d---%H-%M-%S").stderr.tsv) 1> >(tee ./testing_logs/$(date +"%Y-%m-%d---%H-%M-%S").stdout.tsv) \ No newline at end of file +export ENABLE_TESTING_LOG=true +npx next build 2> >(tee ./testing_logs/$(date +"%Y-%m-%d---%H-%M-%S").stderr.tsv) 1> >(tee ./testing_logs/$(date +"%Y-%m-%d---%H-%M-%S").stdout.tsv) diff --git a/src/queries/helpers.ts b/src/queries/helpers.ts index c9d11c3..b4d0c02 100644 --- a/src/queries/helpers.ts +++ b/src/queries/helpers.ts @@ -173,10 +173,12 @@ function prettyTestWritter( process.env.NEXT_PUBLIC_URL_CMS + url, ]; - if (level === TestingLevel.Warning) { - console.warn(line.join("\t")); - } else { - console.error(line.join("\t")); + if (process.env.ENABLE_TESTING_LOG) { + if (level === TestingLevel.Warning) { + console.warn(line.join("\t")); + } else { + console.error(line.join("\t")); + } } }