test(utils): add edge case tests for format()#5848
test(utils): add edge case tests for format()#5848Thesmoothengineer wants to merge 2 commits intosugarlabs:masterfrom
Conversation
|
✅ All Jest tests passed! This PR is ready to merge. |
kartikktripathi
left a comment
There was a problem hiding this comment.
Tested these changes, all npm test suites pass, meaningful change. Thanks!
@walterbender, This PR is ready to be merged.
|
Thank you for reviewing and testing the changes! |
|
@Thesmoothengineer please run prettier before raiaing PR |
|
Sure, I’ll run prettier and update the PR. |
|
I’ve run Prettier on the test file and no formatting changes were required. Please let me know if anything else needs to be updated. |
|
@Thesmoothengineer please resolve merge conflicts. |
717a848 to
1658179
Compare
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
|
@Thesmoothengineer Jest cases are failing. |
|
@vanshika2720 The latest CI run is passing. |
|
✅ All Jest tests passed! This PR is ready to merge. |
What needs testing
Added additional edge case tests for the format() utility function in utils.js.
Specifically covering:
Missing nested properties (e.g. {user.age})
Original string return when no placeholders exist
Current coverage
The format() function already had tests for:
However, missing nested property access and no-placeholder cases were not explicitly covered.
Proposed approach
Added new test cases inside:
js/utils/tests/utils.test.js
The tests ensure:
Checklist