From 62bfa1255029edd388ec802a16ceb5fd2806d6de Mon Sep 17 00:00:00 2001 From: Timothy Farrell Date: Sat, 14 Jul 2018 14:51:32 -0500 Subject: [PATCH] Allow the DEBUG envvar to specify if tests opens the browser --- bin/runTests.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/runTests.js b/bin/runTests.js index c140eea..8c93aad 100755 --- a/bin/runTests.js +++ b/bin/runTests.js @@ -14,7 +14,10 @@ const TEST_FILENAME = '.spec_runner.html'; const HOST = '127.0.0.1'; const PORT = 10080; -const DEBUG = false; +const DEBUG = + typeof process.env['DEBUG'] === 'string' + ? process.env['DEBUG'].toLower() == 'true' + : !!process.env['DEBUG']; const PORTFOLIO_DIR = path.normalize(path.join(__dirname, '..')); const JASMINE_DIR = path.relative( PORTFOLIO_DIR,