Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add tests for Formatting.Countdown and Formatting.Ago

Open Beginner friendly
#6 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
90/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
testing

Research direction

Read src/GilSweep.Core/Formatting.cs and its doc comments, then add cases to tests/GilSweep.Tests/Core/FormattingTests.cs for the listed Countdown and Ago boundaries. Pass TimeSpan values directly, and run dotnet test --project tests/GilSweep.Tests; done means every listed boundary is covered and the test command passes.

Written by the indexing model from the issue text.

Description

good first issue

Countdown (node timers: "7m 32s", "1h 05m") and Ago (sweep freshness: "4 min ago") in src/GilSweep.Core/Formatting.cs have no tests. Their doc comments give the rules; the edges are where bugs hide.

To do: add cases to tests/GilSweep.Tests/Core/FormattingTests.cs (create it if needed):

  • Countdown: 0 s, 59 s, 3,599.4 s ("59m 59s"), 3,599.6 s ("1h 00m"), 3,725 s ("1h 02m"), and a negative time ("0m 00s").
  • Ago: 59 s ("just now"), 60 s, 59 min, 1 h, 47 h 59 min, and 48 h ("2 days ago").

Pass TimeSpan values directly; no clock is needed. If a result looks wrong, say so here rather than changing the code in the same PR.

Done when each boundary above is covered and dotnet test --project tests/GilSweep.Tests passes.

Dominant language
C#
Stars
0
Forks
1
Avg merge
23m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hazeliscoding/gil-sweep

All issues in hazeliscoding/gil-sweep

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.