Skip to content

💡 [FEATURE] - Implement unit tests in test/validate-form-simple.test.js #7

@isonnymichael

Description

@isonnymichael

Summary

We need to ensure the core functionality of validateForm works as expected across multiple scenarios. This issue aims to write meaningful unit tests using Jest and jsdom.

Basic Example

Enhance the test coverage in test/validate-form-simple.test.js to cover:

  • Shows error messages when required fields are empty
  • Submits form if all inputs are valid
  • Fails on invalid email
  • Fails on invalid phone number
  • Correct number of error messages
  • Accepts input values and reflects them correctly
  • Honors mocked form.submit behavior

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    testImplement unit test

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions