Skip to content
This repository was archived by the owner on Dec 10, 2020. It is now read-only.

Commit 79eae7b

Browse files
committed
various improvements
1 parent 10b883a commit 79eae7b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/cli/cli.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import tape from 'tape'
33

44
tape('[CLI]', (t) => {
55
t.test('should begin downloading blocks', { timeout: 260000 }, (t) => {
6-
t.plan(1)
76
const file = require.resolve('../../dist/bin/cli.js')
87
const child = spawn(process.execPath, [file])
98

109
const timeout = setTimeout(() => {
1110
child.kill('SIGINT')
11+
t.fail('timed out before finishing')
12+
t.end()
1213
}, 240000)
1314

1415
const end = () => {
@@ -27,12 +28,14 @@ tape('[CLI]', (t) => {
2728
t.pass('successfully imported blocks')
2829
end()
2930
}
30-
console.log(message) // eslint-disable-line no-console
31+
// log for easier debugging
32+
// eslint-disable-next-line no-console
33+
console.log(message)
3134
})
3235

3336
child.stderr.on('data', (data) => {
3437
const message = data.toString()
35-
t.fail(message)
38+
t.fail(`stderr: ${message}`)
3639
end()
3740
})
3841

0 commit comments

Comments
 (0)