提交 7fb4cc9a 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

bug compatible with issue #11

上级 b6af92e6
......@@ -32,6 +32,9 @@ function onFeed({
, timeout = 60000 // 60s default. can be override in options but be careful about the number zero(0)
} = {}) {
type = type || 'HEARTBEAT' // BUG compatible with issue: node-tap strange behaviour cause CircleCI & Travis-CI keep failing #11
timeout = timeout || 60000 // BUG compatible with issue: node-tap strange behaviour cause CircleCI & Travis-CI keep failing #11
if (!this) {
throw new Error('onFeed() must has `this` of instanceof PuppetWeb')
}
......
......@@ -24,6 +24,7 @@ test('Puppet Web watchdog timer', function(t) {
const origLogLevel = log.level
if (log.level === 'info') {
log.level = 'silent'
t.pass('set log.level = silent to mute log when watchDog reset wechaty temporary')
}
yield pw.init()
......@@ -47,7 +48,6 @@ test('Puppet Web watchdog timer', function(t) {
const EXPECTED_DING_DATA = 'dingdong'
pw.emit('watchdog', { data: 'feed to extend the dog life' })
t.pass('set log.level = silent to mute log when watchDog reset wechaty temporary')
const dong = yield waitDing(EXPECTED_DING_DATA)
t.equal(dong, EXPECTED_DING_DATA, 'should get EXPECTED_DING_DATA from ding after watchdog reset, and restored log level')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册