From cfb83ce99138201d09350b6dcb2d94c764de87f0 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sun, 27 Nov 2022 23:39:04 -0800 Subject: [PATCH] fix: add logging for the build-test execution --- build-test.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build-test.js b/build-test.js index b6622a5..aa06cbb 100755 --- a/build-test.js +++ b/build-test.js @@ -3,6 +3,8 @@ process.env.NODE_ENV = 'test' var path = require('path') + +// find the test command from package.json prebuild.test entry var test = null try { @@ -15,5 +17,12 @@ try { // do nothing } -if (test) require(path.join(process.cwd(), test)) -else require('./')() +if (test) { + const testPath = path.join(process.cwd(), test) + console.log(`Running require("${testPath}")`) + require(testPath) +} +else { + console.log(`Running require("./")() at ${process.cwd()}`) + require('./')() +}