Skip to content

Commit 858a7b9

Browse files
committed
Log to stderr in tests
1 parent b88555f commit 858a7b9

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ try {
2121
console.warn('FUSE bindings are not available on this platform.')
2222
}
2323
const log = require('./lib/log').child({ component: 'server' })
24-
2524
const argv = extractArguments()
2625

2726
class HyperdriveDaemon extends EventEmitter {

lib/log.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ module.exports = pino({
1212
name: 'hyperdrive',
1313
level: argv['log-level'] || 'info',
1414
enabled: true,
15-
}, LOGFILE)
15+
}, (process.env['NODE_ENV'] === 'test') ? pino.destination(2) : LOGFILE)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"hyperdrive": "./cli.js"
88
},
99
"scripts": {
10-
"test": "tape test/*.js"
10+
"test": "NODE_ENV=test tape test/*.js"
1111
},
1212
"repository": {
1313
"type": "git",

0 commit comments

Comments
 (0)