Skip to content

Coverage not showing correct value #2

@jgheewala

Description

@jgheewala

Hi,

I have a mock package with 15 mock_*_test.go files. In one of the test file I add following

func TestMain(m *testing.M) { coverage.Run(m, 90) }

However when I am running the test it shows FAIL even when coverage is at 94.2%

`❯ go test -cover $(go list ./... | grep pkg/mock)
PASS
coverage: 94.2% of statements

FAIL Coverage threshold not met 90.0 >= 32.2 for tracing/pkg/mock

FAIL tracing/pkg/mock 0.399s
FAIL`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions