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(MWPW-160872): Adding 100% test coverage #194

Merged
merged 4 commits into from
Oct 22, 2024
Merged

Conversation

sanrai
Copy link
Collaborator

@sanrai sanrai commented Oct 22, 2024

Description

This PR significantly increases the unit test coverage across multiple components and utilities by adding comprehensive test suites. The changes include:

Link to Jira Ticket: https://jira.corp.adobe.com/browse/MWPW-160872

Testing Improvements

  • Added new test files for previously untested components and utilities
  • Extended existing test suites with additional test cases
  • Added coverage for edge cases and error scenarios
  • Implemented tests for async operations and hooks
  • Added tests for UI interactions and event handling

Key Changes

  • Added Istanbul configuration to .babelrc for accurate coverage reporting
  • Added coverage path ignore patterns in jest.config.js
  • Added tests for:
    • App initialization and configuration
    • Card filtering and sorting
    • Event timing and transitions
    • Error handling in Lana logging
    • React hooks and contexts
    • DOM utilities and interactions
    • URL state management
    • Scroll behavior

Bug Fixes

  • Fixed edge cases in event sorting logic
  • Improved error handling in Lana logger
  • Added null checks and default values for component props
  • Fixed URL parameter handling

Configuration Changes

  • Updated Jest configuration for coverage reporting
  • Added Istanbul babel plugin for coverage instrumentation
  • Updated package.json with new testing dependencies

All changes are focused on improving test coverage while maintaining existing functionality.

Testing Notes

  • All new tests pass successfully
  • Coverage reports show significant improvement
  • No regressions in existing functionality
  • Edge cases and error scenarios are now properly tested

@sanrai sanrai changed the title Adding 100% test coverage test(MWPW-160872): Adding 100% test coverage Oct 22, 2024
@sanrai sanrai merged commit 860d7ab into main Oct 22, 2024
10 checks passed
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.

3 participants