lim*_*imp 4 mocha.js node.js supertest
我正试图用一些代码来测试我的服务器:
describe 'POST /do/some/stuff/', ->
it 'should do this thing', (done) ->
request app
.post '/do/some/stuff/'
.timeout 10000
.expect 200
.end (err, res) ->
return done err if err?
done()
Run Code Online (Sandbox Code Playgroud)
服务器正在做的事情通常需要几秒钟,这比默认超时2000毫秒长,所以我打电话.timeout 10000.但是,尽管如此,当我运行代码时,我得到:
1) POST /do/some/stuff/ should do this thing:
Error: timeout of 2000ms exceeded
Run Code Online (Sandbox Code Playgroud)
我需要做些什么来增加此超时?
| 归档时间: |
|
| 查看次数: |
5637 次 |
| 最近记录: |