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

fix unit test run partly bug

上级 d8c759fe
......@@ -8,7 +8,7 @@
"pretest": "npm run lint",
"start": "node bin/io-bot",
"demo": "node example/ding-dong-bot.js",
"test": "cross-env LC_ALL=C TAP_TIMEOUT=600 tape test/**/*.spec.js"
"test": "cross-env LC_ALL=C TAP_TIMEOUT=600 tape test/{*,**/*}.spec.js"
},
"repository": {
"type": "git",
......
......@@ -124,6 +124,7 @@ class Browser extends EventEmitter {
// phantomjsArgs.push('--webdriver-logfile=webdriver.debug.log')
} else {
phantomjsArgs.push('--webdriver-loglevel=ERROR')
// phantomjsArgs.push('--webdriver-loglevel=NONE')
}
const customPhantom = WebDriver.Capabilities.phantomjs()
......
......@@ -96,6 +96,11 @@ Room.load = function(id) {
}
return Room.pool[id] = new Room(id)
}
Room.attach = function(puppet) { Room.puppet = puppet }
Room.attach = function(puppet) {
// if (!puppet) {
// throw new Error('Room.attach got no puppet to attach!')
// }
Room.puppet = puppet
}
module.exports = Room
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册