This codebase uses bruno to test all endpoints which are exposed to the frontend.
In order to allow for automation and help us avoid regression we have integrated all tests into the code base. You can access all test scripts directly in your IDE or through the Bruno app.
To access all tests from within Bruno:
-
open the app and on the top-left corner select
open collection -
select the folder
brunowithin your local repo -
a new collection called
arebyte-apiwill be displayed in Bruno
Inside the bruno directory you will find a .env.example file. Use this to create a .env in the same folder and then fill in the value with your own jwt token.
You can retrieve your token by following the steps in the official documentation here
Once this has been set up you can edit tests and track changes along with the rest of the code base.
All tests can now be edited through the Bruno GUI or in the IDE.
Any edits made to the .bru files will be tracked by your Bruno GUI.
## Running the tests
The bruno cli is one of the dev dependencies in this project and we have prepared a simple script that will run all tests:
npm run testPlease keep in mind that the server must be running.
If you are running tests in the Bruno GUI you will need to select local in the environment drop-down menu on the top-right corner of the window.


