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

rename BINARY_CHROMIUM to CMD_CHROMIUM

上级 bd800313
{
"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.
先完成此消息的编辑!
想要评论请 注册