mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
* refactor: update headerList methods and translations for consistency - Renamed methods in req.headerList and res.headerList from 'forEach' to 'each' for consistency with the new API. - Updated method translations in the Postman converters to reflect the new method names: 'append' to 'add', 'set' to 'upsert', and 'delete' to 'remove'. - Adjusted related tests to ensure they validate the new method names and functionality. - Removed deprecated test cases for 'append' and 'set', replacing them with tests for 'add' and 'upsert'. - Enhanced documentation to clarify the changes in method names and their usage. * test: add new tests for HeaderList methods and behavior - Introduced tests to verify that the 'idx' property is undefined in HeaderList, ensuring compliance with the updated API. - Added tests to confirm that positional methods (prepend, insert, insertAfter) do not exist in HeaderList, reflecting the recent refactor. - Implemented a test to check that the two-argument form of the 'add' method correctly overwrites existing headers, enhancing the robustness of header management tests.
bruno-tests
This package is used to test the Bruno CLI.
We have a collection that sits in the collection directory.
Test Server
This will start the server on port 80 which exposes endpoints that the collection will hit.
# install node dependencies
npm install
# start server
npm start
Run Bru CLI on Collection
cd collection
# run collection against local server
node ../../bruno-cli/bin/bru.js run --env Local --output junit.xml --format junit
# run collection against prod server hosted at https://testbench.usebruno.com
node ../../bruno-cli/bin/bru.js run --env Prod --output junit.xml --format junit