Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
.Veneno.
wechaty
提交
5aa0ad6d
W
wechaty
项目概览
.Veneno.
/
wechaty
与 Fork 源项目一致
Fork自
wechaty / wechaty
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wechaty
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5aa0ad6d
编写于
9月 17, 2016
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:wechaty/wechaty
上级
9494d3bb
087c607e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
7 deletion
+8
-7
README.md
README.md
+1
-1
package.json
package.json
+3
-2
src/config.spec.js
src/config.spec.js
+1
-1
src/puppet-web/browser.js
src/puppet-web/browser.js
+2
-2
test/docker.spec.js
test/docker.spec.js
+1
-1
未找到文件。
README.md
浏览文件 @
5aa0ad6d
...
...
@@ -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/)
...
...
package.json
浏览文件 @
5aa0ad6d
{
"name"
:
"wechaty"
,
"version"
:
"0.3.1
6
"
,
"version"
:
"0.3.1
7
"
,
"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"
...
...
src/config.spec.js
浏览文件 @
5aa0ad6d
...
...
@@ -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
=>
{
...
...
src/puppet-web/browser.js
浏览文件 @
5aa0ad6d
...
...
@@ -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
/**
...
...
test/docker.spec.js
浏览文件 @
5aa0ad6d
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录