Skip to content

Commit

Permalink
fix: add logging for the build-test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 14, 2024
1 parent 4a173b4 commit cfb83ce
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions build-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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('./')()
}

0 comments on commit cfb83ce

Please sign in to comment.