nyc icon indicating copy to clipboard operation
nyc copied to clipboard

How can I configure default sort in lcov reports?

Open doublethefish opened this issue 3 years ago • 1 comments

Link to bug demonstration repository

n/a

Expected Behavior

To be able to configure lcov's HTML report to sort by coverage % by default, percolating least covered files to the top.

I have not yet been able to work out how to change the default sort order generated by lcov when using the NYC middlewhere.

We have a project that mandates 100% coverage so being able to quickly find the uncovered files would be awesome. I imagine it's really easy, but I'm being really dumb.

image

Observed Behavior

Reports are sorted by file-first.

image

Troubleshooting steps

  • [x] still occurring when I put cache: false in my nyc config

Environment Information

  Binaries:
    Node: 18.7.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - /opt/homebrew/bin/npm
  npmPackages:
    nyc: ^15.1.0 => 15.1.0
    source-map-support: ^0.5.21 => 0.5.21
    ts-node: ^10.9.1 => 10.9.1
    typescript: ^4.9.4 => 4.9.4

doublethefish avatar Jan 06 '23 09:01 doublethefish

Yes it's good to add some configuration in .nycrc.json for this default sort of test report.

artbindu avatar Jan 30 '23 05:01 artbindu