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

Merge branch 'master' of github.com:wechaty/wechaty

......@@ -8,7 +8,7 @@ Wechaty is a Bot Framework for Wechat **Personal** Account, It can help you easy
:octocat: <https://github.com/wechaty/wechaty>
:beetle: <https://github.com/wechaty/wechaty/issues>
:book: <https://github.com/wechaty/wechaty/wiki>
:whale: <https://hub.docker.com/r/wechaty/wechaty>
:whale: <https://hub.docker.com/r/zixia/wechaty>
[![Join the chat at https://gitter.im/zixia/wechaty](https://badges.gitter.im/zixia/wechaty.svg)](https://gitter.im/zixia/wechaty?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![node](https://img.shields.io/node/v/wechaty.svg?maxAge=2592000)](https://nodejs.org/)
......
{
"name": "wechaty",
"version": "0.3.16",
"version": "0.3.17",
"description": "Wechat for Bot (Personal Account)",
"main": "index.js",
"wechaty": {
......@@ -12,7 +12,7 @@
"DEFAULT_PROTOCOL": "io|0.0.1",
"DEFAULT_TOKEN": "WECHATY_IO_TOKEN",
"DEFAULT_APIHOST": "api.wechaty.io",
"BINARY_CHROMIUM": "/wechaty/bin/xvfb-chromium"
"CMD_CHROMIUM": "/wechaty/bin/xvfb-chromium"
},
"scripts": {
"lint": "npm run eslint && npm run tslint",
......@@ -25,6 +25,7 @@
"test:phantomjs": "cross-env LC_ALL=C WECHATY_LOG=info WECHATY_HEAD=phantomjs ava --timeout=10m \"{src,test}/**/*.spec.js\"",
"test:chrome": "cross-env LC_ALL=C WECHATY_LOG=silly WECHATY_HEAD=chrome ava --timeout=10m \"{src,test}/**/*.spec.js\"",
"testdev": "cross-env LC_ALL=C WECHATY_LOG=silly ava --serial --verbose --fail-fast --timeout=3m",
"prepublish": "npm test",
"ava": "cross-env LC_ALL=C WECHATY_LOG=verbose ava \"{src,test}/**/*.spec.js\"",
"start": "node bin/client",
"demo": "node example/ding-dong-bot.js"
......
......@@ -19,7 +19,7 @@ test('Config list vars', t => {
t.truthy(Config.DEFAULT_PUPPET_PORT , 'should export DEFAULT_PUPPET_PORT')
t.truthy(Config.DEFAULT_PROTOCOL , 'should export DEFAULT_PROTOCOL')
t.truthy(Config.DEFAULT_APIHOST , 'should export DEFAULT_APIHOST')
t.truthy(Config.BINARY_CHROMIUM , 'should export BINARY_CHROMIUM')
t.truthy(Config.CMD_CHROMIUM , 'should export CMD_CHROMIUM')
})
test('Config methods', t => {
......
......@@ -162,7 +162,7 @@ class Browser extends EventEmitter {
args: ['--no-sandbox'] // issue #26 for run inside docker
}
if (Config.isDocker) {
options.binary = Config.BINARY_CHROMIUM
options.binary = Config.CMD_CHROMIUM
}
const customChrome = WebDriver.Capabilities.chrome()
......@@ -300,7 +300,7 @@ this.onResourceRequested = function(request, net) {
}
clean() {
const max = 15
const max = 30
const backoff = 100
/**
......
......@@ -18,6 +18,6 @@ Config.isDocker && test('Docker smoking test', function(t) {
// const n = execSync('ps a | grep Xvfb | grep -v grep | wc -l').toString().replace(/\n/, '', 'g')
// t.is(parseInt(n), 1, 'should has Xvfb started')
t.notThrows(_ => {
fs.accessSync(Config.BINARY_CHROMIUM, fs.X_OK)
fs.accessSync(Config.CMD_CHROMIUM, fs.X_OK)
}, 'should exist xvfb-chrome exectable')
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册