Skip to content

testing: add unit tests for metric-engine.ts and rule-engine.ts #27

@boldsbrainai

Description

@boldsbrainai

Summary

metric-engine.ts and rule-engine.ts are the core evaluation engines of the product. They are currently only exercised indirectly through antipatterns-e2e.test.ts. Regressions in these engines could silently corrupt all analysis output without any test failure.

Scope

  • src/core/metric-engine.test.ts — cover evaluate(), calibrate(), custom threshold overrides, edge cases (missing data, zero values)
  • src/core/rule-engine.test.ts — cover compile(), condition evaluation, multi-condition rules, fallback behavior

Effort estimate

~1 day

Metadata

Metadata

Labels

testingTest coverage or test infrastructure

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions