mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 11:51:30 +00:00
* feat: enhance jsonBody translation handling in Postman to Bruno converter * feat: implement jsonBody assertion for Postman compatibility and enhance translation handling - Added custom Chai assertion for jsonBody to validate JSON structures, including deep equality and nested properties. - Updated Postman to Bruno translation logic to utilize the new jsonBody assertion, improving the handling of response validations. - Enhanced test coverage for jsonBody translations, including positive and negative cases for nested properties and deep equality checks. * feat: enhance jsonBody assertion translations for Postman compatibility - Added translations for `pm.response.not.to.have.jsonBody` and `pm.response.to.have.not.jsonBody` to the Postman to Bruno converter. - Updated tests to cover new translation cases, ensuring proper handling of negation scenarios for JSON body assertions. - Enhanced existing jsonBody assertion logic to support new translation patterns, improving overall compatibility with Postman syntax. * feat: add advanced path parsing for jsonBody assertions - Introduced a new `parsePath` function to handle various property path formats, including dot notation, numeric brackets, and quoted keys. - Updated the `getNestedValue` function to utilize the new path parsing logic, enhancing the robustness of jsonBody assertions. - Expanded test cases to cover a wide range of scenarios, including edge cases for bracket notation and keys with special characters. * docs: add examples for parsePath function in jsonBody assertions - Enhanced documentation for the `parsePath` function by including examples of various property path formats. - Updated comments in both `assert-runtime.js` and `test.js` to clarify the handling of dot notation, numeric brackets, and quoted keys. * fix: improve path handling in assertions for quoted keys - Updated condition checks in `assert-runtime.js` and `test.js` to ensure proper handling of quoted keys in path parsing. - Enhanced robustness of the path parsing logic to prevent potential out-of-bounds errors.