Skip to content

test(enrichment): unit coverage for the license-check analyzer #2114

Description

@JSONbored

review-enrichment/src/analyzers/license-check.ts (98 lines) has no test. Cover the deterministic license-classification/flagging logic (permissive vs copyleft vs unknown) without the network dependency-metadata fetch. Part of the REES analyzer runtime.

Deliverables

  • Create review-enrichment/test/license-check.test.ts
  • Cover the license classification branches the module encodes (permissive allowed vs copyleft/unknown flagged)
  • Cover the no-license-change / clean-patch path → no findings
  • Assert finding shape and stable ordering
  • Scope to the pure classification logic; leave scanLicenses network wiring for a follow-up
  • Verify branch coverage with the review-enrichment test suite

References

  • review-enrichment/src/analyzers/license-check.ts:65
  • review-enrichment/test/native-build.test.ts

Part of #1499.


size: XS · gittensor:bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions