From 33c1fd716ca6a77a7b52546c0c8453d3ee024313 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 30 Oct 2018 06:26:36 +0100 Subject: [PATCH] scripts: enhance logs --- scripts/build-client.js | 2 +- tests/test.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build-client.js b/scripts/build-client.js index aec39944..5a0d3cc3 100644 --- a/scripts/build-client.js +++ b/scripts/build-client.js @@ -25,7 +25,7 @@ var transforms = [ ] if (prod) { - console.warn('\x1b[36m%s\x1b[0m', '=> Building minified client bundle, this may take a while...') + console.warn('\033[36m=> Building minified client bundle, this may take a while...\033[0m') transforms.push([transformWrapper(require('uglifyify')), {global: true}]) } diff --git a/tests/test.js b/tests/test.js index ed37cd98..5faab557 100644 --- a/tests/test.js +++ b/tests/test.js @@ -30,13 +30,18 @@ function std(data){ if (data.includes('process error')) { console.error(data.toString()) + console.log('\033[31m\n=> Test errored ✘\n\033[0m') + end() } } // timeout after 5s -> no error -setTimeout(end, 5000) +setTimeout(()=>{ + console.log('\033[36m\n=> Test timeout without error ✔\n\033[0m') + end() +}, 5000) function end(fail){ process.kill(-proc.pid)