Skip to content

running code coverage produces result for only 1 component #1006

Open
@mohanraj-r

Description

@mohanraj-r

Summary

npm run test:unit:coverage produces result for only 1 cmp resourceLoader.js

Salesforce Org Type

Scratch Org

Steps To Reproduce

  1. On recent main (641a7f6)
  2. npm install
  3. npm run test:unit:coverage
  4. Check console output for coverage summary
  5. Open coverage/lcov-report/index.html in browser for coverage results
  6. Optionally add following to jest.config.js to debug (same results with or without this config change)
collectCoverage: true,
coverageReporters: ['json', 'html', 'lcov', 'text'],

Current Behavior

-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
All files          |       0 |      100 |       0 |       0 |
 resourceLoader.js |       0 |      100 |       0 |       0 | 9-16
-------------------|---------|----------|---------|---------|-------------------

Test Suites: 122 passed, 122 total
Tests:       425 passed, 425 total
Snapshots:   0 total
Time:        5.421 s
Ran all test suites.

Opening coverage/lcov-report/index.html in browser shows the same results.

Expected Behavior

Coverage is output for all components the 425 tests ran against.

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions