1
我有一個非常簡單的API測試用例,使用了回送測試模塊。如何關閉strongloop回送測試控制檯日誌記錄?
lt = require('loopback-testing')
assert = require('assert')
describe '/profile', ->
lt.beforeEach.withApp app
lt.describe.whenCalledRemotely 'GET', '/api/profiles/ping', { data: 'test' }, ->
lt.it.shouldBeAllowed()
it 'should have statusCode 200', ->
assert.equal @res.statusCode, 200
it 'should have pong response', ->
assert.equal @res.body.pong, 'test'
和測試,我在系統控制檯這樣的人越來越打印的行結果:
/profile
GET /api/profiles/ping
GET /api/profiles/ping 200 50.639 ms - 15
✓ should be allowed
GET /api/profiles/ping 200 8.026 ms - 15
✓ should have statusCode 200
GET /api/profiles/ping 200 3.633 ms - 15
✓ should have pong response
有沒有辦法關閉環回測試寫這些線系統控制檯模塊?這簡直會影響我的摩卡報告概述。