TheVicky1 / TheVicky1/Pact_OS

test: add unit tests for task priority sorting comparator

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

Nobody has claimed this yet.

area:testing beginner friendly community contributions-welcome difficulty:beginner difficulty:easy enhancement good first issue help wanted time:15-30m type:test up-for-grabs
Dominant language
TypeScript
Stars
5
Forks
7
Avg merge
39m
Merged PRs (30d)
39

Description

🎯 What needs to be done

Add unit test assertions verifying that tasks sort deterministically by priority rank (HIGH > MEDIUM > LOW > NONE) when deadlines are identical.

Why this matters

Prevents sorting instability and inconsistent task ordering on the planner and task board.

📍 Where to work

  • tests/tasks-validation.test.ts
  • src/lib/validations/domain.ts

Contributor guide

Open the contributing guide

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.

Research direction

Start in tests/tasks-validation.test.ts and inspect the task sorting comparator in src/lib/validations/domain.ts. Add assertions for identical deadlines that verify the order HIGH, MEDIUM, LOW, then NONE, and run the relevant validation test file to confirm deterministic sorting.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.