Skip to content

refactor(svg): add a ?scale=log integration test verifying shorter tower heights #382

@JhaSourav07

Description

@JhaSourav07

🧩 Background

?scale=log is tested for a 200 response but no test verifies that logarithmic scaling actually produces different (shorter for high counts) tower heights than linear.

🎯 Objective

Add a test that calls with the same high-count calendar under both scale=linear and scale=log and asserts the SVG output differs.

📁 Files to touch

  • app/api/streak/route.test.ts

🛠️ Implementation steps

  • Use a calendar with a high-count day (e.g. 20 contributions).
  • Get both SVGs and compare that they are not identical strings.
  • Optionally assert specific height values.

✅ Definition of done

  • Test confirms scale=log produces different SVG than scale=linear.
  • All existing tests pass.

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions