I'm currently testing Foxx service in ArangoDB : https://docs.arangodb.com/3.11/develop/foxx-microservices/guides/testing-foxx-services/
In order to help debugging i want to log the response body. I tried to use console.log :
describe('test of action service', function(){
it('should return 200 on diagnostic', function(){
const response = request.get(baseUrl+'/action/diagnostic');
console.log(response.body);
expect(response.status).to.equal(200);
});
});
but when i launch my tests it doesn't seems to work. Did i miss something here?
The output of
console.log()ends up in the ArangoDB server logfile. So if you previously configured logging in theetc/arangodb3/arangod.conf:You should find the logfile
/var/log/arangodb3/arangod.logon your disk.So, invoking:
will write this into
/var/log/arangodb3/arangod.log:You should be able to do similar for the
response.body- maybe you want to try:to get the output of the complete serialized object.