Skip to content

Util.inspect Depth not deep enough #578

@GeoFro

Description

@GeoFro

I was testing the response bodies of my API and came across the problem that the more deeply nested objects were not being parsed.

I would get the following,

{ 
  id: 1,
  title: 'Tech Lead',
  createdAt: '2019-05-19T07:56:54.307Z',
  updatedAt: '2019-05-19T07:56:54.307Z',
  Attempts: [
    { 
  	id: 1,
        status: 'Pending',
        createdAt: '2019-05-19T07:56:54.307Z',
        updatedAt: '2019-05-19T07:56:54.307Z',
        UserId: 1,
        InterviewId: 1,
        User: [Object]
    }
  ] 
}

Note the User: [Object] which should be my full User object.

I've made changes to util.inspect so that all deeply nested objects will now show properly.
E.g, util.inspect(body, { depth: null });

See PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions