Skip to content

Write Unit Test for toErrorMessage utility #157

@sunilk429

Description

@sunilk429

Issue Description

The toErrorMessage utility function is missing unit tests.

Expected Behavior

  • Unit tests should be added for the toErrorMessage utility to ensure:
    • It correctly extracts and returns the error message from the response object.
    • It returns a default error message when a custom message is not available.
    • It handles cases where the response or data is undefined.

Current Behavior

There are no unit tests currently implemented for the toErrorMessage utility function.

Reproducibility

  • This issue is reproducible.
  • This issue is not reproducible.

You can reproduce the issue by navigating to the utils folder and verifying that there are no tests for the toErrorMessage function.

Steps to Reproduce

  1. Navigate to the _tests_/utils folder.
  2. Confirm the absence of test coverage for the toErrorMessage utility function.

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions