TheVicky1 / TheVicky1/Pact_OS

test: add unit test for in-app notification filtering

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

Nobody has claimed this yet.

accessibility area:testing beginner friendly bug community contributions-welcome difficulty:beginner enhancement good first issue help wanted time:<15m 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

In tests/notifications.test.ts, add a unit test asserting that notification delivery helpers handle empty recipient lists gracefully without throwing unhandled exceptions.

Why this matters

Ensures resilient notification delivery when no channels are configured or available.

📍 Where to work

tests/notifications.test.ts

🧭 Implementation guidance

  1. Open tests/notifications.test.ts.
  2. Add a test case testing deliverInApp or dispatchNotification with an empty or unconfigured state.
  3. Assert that it resolves safely with the expected fallback status.

✅ Acceptance criteria

  • Unit test added in tests/notifications.test.ts.
  • Test passes when running npm test.

🧪 Verification

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/notifications.test.ts and review the existing tests for deliverInApp and dispatchNotification. Add coverage for an empty or unconfigured recipient state, asserting it resolves with the expected fallback status without an unhandled exception. Run npm test and confirm the new test passes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.