Skip to content

Function coverage below 100% even though there are no uncovered lines #3

@ralfhandl

Description

@ralfhandl

After adding tests until there are no uncovered lines, the "function" coverage is still below 100% for one schema:

 % Coverage report from @hyperjump/json-schema-coverage/vitest
------------------|---------|----------|---------|---------|-------------------
File              | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
All files         |     100 |      100 |   99.76 |     100 |                  
 dialect.yaml     |     100 |      100 |     100 |     100 |                  
 meta.yaml        |     100 |      100 |     100 |     100 |                  
 schema-base.yaml |     100 |      100 |     100 |     100 |                  
 schema.yaml      |     100 |      100 |   99.74 |     100 |                  
------------------|---------|----------|---------|---------|-------------------
ERROR: Coverage for functions (99.76%) does not meet global threshold (100%)

According to the Legend

  • Functions = Subschemas

and I don't understand how I can miss a subschema if I have covered all lines.

How can I find out what I need to test (or refactor in the schema) to get to 100% coverage?

See OpenAPI PR OAI/OpenAPI-Specification#4780 for details.

Metadata

Metadata

Assignees

No one assigned

    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