Skip to content

Commit 991fdc2

Browse files
committed
fix: add logging for the build-test execution
1 parent d2d9e5d commit 991fdc2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

build-test.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
process.env.NODE_ENV = 'test'
44

55
var path = require('path')
6+
7+
// find the test command from package.json prebuild.test entry
68
var test = null
79

810
try {
@@ -15,5 +17,12 @@ try {
1517
// do nothing
1618
}
1719

18-
if (test) require(path.join(process.cwd(), test))
19-
else require('./')()
20+
if (test) {
21+
const testPath = path.join(process.cwd(), test)
22+
console.log(`Running require("${testPath}")`)
23+
require(testPath)
24+
}
25+
else {
26+
console.log(`Running require("./")() at ${process.cwd()}`)
27+
require('./')()
28+
}

0 commit comments

Comments
 (0)