Merge pull request #5 from Accords-Library/develop

Disable testing log on npm build
This commit is contained in:
DrMint 2022-03-06 02:40:37 +01:00 committed by GitHub
commit e6214600bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,2 @@
NODE_ENV=test export ENABLE_TESTING_LOG=true
# 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) 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)

View File

@ -173,10 +173,12 @@ function prettyTestWritter(
process.env.NEXT_PUBLIC_URL_CMS + url, process.env.NEXT_PUBLIC_URL_CMS + url,
]; ];
if (level === TestingLevel.Warning) { if (process.env.ENABLE_TESTING_LOG) {
console.warn(line.join("\t")); if (level === TestingLevel.Warning) {
} else { console.warn(line.join("\t"));
console.error(line.join("\t")); } else {
console.error(line.join("\t"));
}
} }
} }