Skip to content

[Bug]: Using include in coverage will cause file items to be displayed repeatedly in the report. #815

@hoifong

Description

@hoifong

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-13420H
    Memory: 1.15 GB / 15.73 GB
  Browsers:
    Edge: Chromium (142.0.3595.80)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rstest/adapter-rslib: ^0.1.0 => 0.1.1
    @rstest/core: ^0.7.7 => 0.7.7
    @rstest/coverage-istanbul: ^0.1.4 => 0.1.4

Details

coverage配置中给include配置会导致报告中重复展示文件项:

Image Image Image

Reproduce link

https://github.com/hoifong/rstest-issue-reproduce

Reproduce Steps

  1. npx create rslib@latest test-project (development tools 选中rstest)
  2. cd test-project
  3. 编辑rstest.config.ts, 加上coverage配置项:{enabled: true, include: ["src/**/*.{ts,tsx,js,jsx}"]}
  4. npm i
  5. npm run test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions