This Pull Request addresses the goal of splitting the test cases in index.test.js and adding new test cases to ensure better test coverage and readability.
Related Issue
This PR resolves the issue mentioned in #78.
Changes Made
Test Case Refactoring: Split the existing test cases in index.test.js to isolate individual scenarios, making the tests easier to manage and understand.
Added New Tests: Introduced additional test cases to cover edge cases and ensure the robustness of the validation logic.
Valid GTIN Tests: Expanded tests for valid GTIN-8 and GTIN-12 numbers.
Invalid GTIN Tests: Added more test cases for invalid GTINs to confirm proper handling of incorrect formats and values.
Null and Undefined Handling: Tested for proper behavior when the input is null or undefined.
Steps Taken
Verified all the existing and new test cases pass.
Ran the application with valid and invalid GTIN numbers for confirmation.
Benefits
Improved Test Structure: Enhanced test maintainability by separating scenarios.
Increased Test Coverage: Ensured the validation logic works correctly with additional edge case testing.
@0xflotus Please review the changes and let me know if any further adjustments are needed.
Split Test Cases and Add New Tests
Overview
This Pull Request addresses the goal of splitting the test cases in
index.test.js
and adding new test cases to ensure better test coverage and readability.Related Issue
This PR resolves the issue mentioned in #78.
Changes Made
index.test.js
to isolate individual scenarios, making the tests easier to manage and understand.null
orundefined
.Steps Taken
Benefits
@0xflotus Please review the changes and let me know if any further adjustments are needed.