Skip to content

Coverage Report File Extensions are wrong #67

@CodeMedic42

Description

@CodeMedic42

I am getting a coverage report using PTI. However I am running into many issues which I am failing to find decent answers for.

I am only going to pick one issue for now.

I am getting a coverage report and can render it using nyc. It also appears to be taking the source map into account. However the resulting report is rendering files names incorrectly.

The file names are close but incorrect. The report is showing the file extension as jsx.js/tsx.js/ts.js instead of just jsx/tsx/ts.

Would anyone have any idea on what could be going on here? I am using Webpack and can provide the config for that if that might help.

Here is a snippet of the report from the console.

.nyc_output/src/components/drop-down               |   70.39 |      100 |     100 |   70.39 |                                                                                                                                                                                                                                                          
  anchor-binding.tsx.js                             |   75.79 |      100 |     100 |   75.79 | 3,13-15,17-27,38-41,69-75,78-87,102,127                                                                                                                                                                                                                  
  drop-down-context.jsx.js                          |   89.47 |      100 |     100 |   89.47 | 4-5                                                                                                                                                                                                                                                      
  drop-down-list-item.jsx.js                        |      88 |      100 |     100 |      88 | 14-16,37-44,48                                                                                                                                                                                                                                           
  drop-down-list.tsx.js                             |   62.06 |      100 |     100 |   62.06 | 11-12,14-24,35-40,79-107,110-112,116-118,130                                                                                                                                                                                                             
  drop-down.tsx.js                                  |   64.74 |      100 |     100 |   64.74 | 16-17,19-29,118-129,135-146,161-168,172-174,177,180-182,189-195,204-206,208-210,213-227,241-245,249-257,260-272,275-290,293-304,307-309,313-315,330-332,334-336,342-356,363-369,372-388,397-402,405-407,417-419,429-431,475                              
  index.ts.js                                       |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                          
  list-item-button.jsx.js                           |   77.06 |      100 |     100 |   77.06 | 14,16-19,21-30,50-55,58-60,74                                                                                                                                                                                                                            
  list-item-content.jsx.js                          |   77.27 |      100 |     100 |   77.27 | 10-11,13-22,35-37       

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