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
有没有办法关闭环回测试写这些线系统控制台模块?这简直会影响我的摩卡报告概述。