Skip to content

Idea: track command, args, cwd, env of each process #158

Closed
@isaacs

Description

@isaacs

Nyc right now creates a really interesting record of not just what lines and files were covered, but also what lines and files were covered by each individual process, organized by pid.

I was thinking it might be interesting to have a way to drill into the details of each of those commands.

It might be worth putting off until someone has an idea for how to report on this, but even just for forensics or saving coverage reports for later analysis, it could be interesting. And it's probably relatively trivial to just dump some process info into the json along with the coverage data. If it's problematic to put it in the same file, it could be dropped into a file at .nyc_coverage/processinfo/<pid>.json containing:

{
  "argv": process.argv,
  "execArgv": process.execArgv,
  "env": process.env,
  "cwd": process.cwd()
}

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