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.

Assessment

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

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.

Description

accessibility area:testing beginner friendly bug community contributions-welcome difficulty:beginner enhancement good first issue help wanted time:<15m type:test up-for-grabs

🎯 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

Dominant language
TypeScript
Stars
5
Forks
7
Avg merge
58m
Merged PRs (30d)
42

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.

More from TheVicky1/Pact_OS

All issues in TheVicky1/Pact_OS

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.