Skip to content

refactor(api): add test for ?font= parameter in streak route #331

@JhaSourav07

Description

@JhaSourav07

🧩 Background

?font= is a documented parameter but has no route-level tests. Only generator unit tests cover font handling.

🎯 Objective

Add route-level tests for predefined fonts (jetbrains) and dynamic Google Fonts (Inter).

📁 Files to touch

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

🛠️ Implementation steps

  • Test ?font=jetbrains: SVG body contains JetBrains Mono.
  • Test ?font=Inter: SVG body contains the Google Fonts import URL.
  • Test ?font= (empty): falls back to default fonts.

✅ Definition of done

  • 3 new test cases.
  • All existing tests pass.

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions