Skip to content

Code coverage shows different code coverage result for JS and HTML tests #876

Open
@motss

Description

@motss

Description

This issue was recently found when both JS and HTML tests are involved in a test suite. wtr enables us to write tests in either JS and/ or HTML. However, the code coverage tends to tell a different story when both JS and HTML tests present in a test suite when some of the tests have to be written in HTML while the rest can be written in JS files.

Please clone this repo to better understand the issue.

Expected behavior

Code coverage should show 100% when all lines of code are covered by tests.

Actual behavior

Code coverage drops below 100% when all lines of code are covered by JS tests but partially in HTML tests.

Code coverage output

Code coverage with JS tests only

All codes are covered in JS tests and it shows 100% code coverage.

code coverage with js tests only

Code coverage with JS and HTML tests

All codes are covered in JS tests but not in HTML test. This causes the code coverage to drop below 100% even though all lines of code are covered in JS tests.

code coverage wih js and html tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions