Skip to content

Add Tests for useAlertSnoozes Hook #757

Description

@Mosas2000

Description

The alert snooze hook has no tests. frontend/src/hooks/useAlertSnoozes.ts has no corresponding test file, so alert snooze create/cancel/list logic is untested.

Requirements and context

  • Add useAlertSnoozes.test.tsx
  • Cover snooze creation, cancellation, and listing
  • Use MSW for API mocking per existing conventions
  • Ensure tests pass under the frontend vitest config

Suggested execution

Fork the repo and create a branch

git checkout -b test/hooks-use-alert-snoozes

Implement changes

  • Add the hook test file
  • Cover happy paths and error states
  • Verify with npm run test --workspace=frontend

Example commit message

test: add tests for useAlertSnoozes hook

Guidelines

  • Assignment required before starting
  • PR must include a closing reference to this issue
  • Timeframe: 72 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions