Skip to content

Commit 45bc592

Browse files
committed
test: update workflow
1 parent 91bc0b7 commit 45bc592

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ jobs:
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm install
22+
- run: npm run test-ci
2223
- run: npm test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"release": "standard-version",
88
"pretest": "node scripts/run-standard.js \"lib/**/*.js\" \"bin/*.js\" \"test/*js\" \"scripts/*.js\"",
99
"test": "node scripts/run-tap.js \"test/*.js\" --timeout 10000 --jobs=1 --reporter spec --no-coverage",
10-
"test-ci": "node scripts/run-tap.js --coverage \"test/*.js\" --timeout 1000 --jobs=1 --reporter tap"
10+
"test-ci": "node scripts/run-tap.js --coverage \"test/*.js\" --timeout 1000 --jobs=1 --reporter tap --verbose"
1111
},
1212
"repository": {
1313
"type": "git",

scripts/run-tap.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ function parseCliArgs (argv) {
226226
coverage: false,
227227
jobs: null,
228228
reporter: null,
229-
timeout: null
229+
timeout: null,
230+
verbose: false
230231
}
231232

232233
for (let i = 0; i < argv.length; i += 1) {
@@ -248,6 +249,10 @@ function parseCliArgs (argv) {
248249
options.coverage = true
249250
} else if (arg === '--no-coverage') {
250251
options.coverage = false
252+
} else if (arg === '--verbose') {
253+
options.verbose = true
254+
} else if (arg === '--no-verbose') {
255+
options.verbose = false
251256
} else if (arg === '--') {
252257
patterns.push(...argv.slice(i + 1))
253258
break
@@ -356,6 +361,11 @@ async function main () {
356361

357362
const tap = require('tap')
358363

364+
if (options.verbose) {
365+
process.env.TAP_VERBOSE = '1'
366+
process.env.TAP_DEV_SHORTSTACK = '0'
367+
}
368+
359369
if (options.timeout != null) {
360370
const timeout = Math.max(options.timeout, 5000)
361371
tap.setTimeout(timeout)

0 commit comments

Comments
 (0)