Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(notifier): create tests for notifier and its redis helper #338

Open
wants to merge 21 commits into
base: notifier-refactoring
Choose a base branch
from

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Dec 25, 2024

Testcases

RedisHelper

  • should connect to redis client
  • should close redis client
  • should not throw error on close if client is already closed
  • should return event count
  • should reset counter and timestamp if threshold period is expired

Notifier

  • should send task if event threshold reached
  • should not send task if event count is more than event threshold
  • should not send task if event count is less than event threshold
  • should not check for event count and should not send event to sender if rule is disabled
  • should not check for event count and should not send event to sender if rule validation did not pass
  • should send event to all channels that are enabled in rule

workers/notifier/tests/worker.test.ts Outdated Show resolved Hide resolved
workers/notifier/tests/worker.test.ts Outdated Show resolved Hide resolved
@e11sy e11sy changed the title chore(notifier-tests): create tests for notifier and its redis helper test(notifier): create tests for notifier and its redis helper Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants