A preset in @ng-apimock/core is represented in a json file. It allows you to set the state of one or multiple mocks and set variables all at once.
This can for instance be used to set all the mocks correctly for your happy or onhappy flow.
Writing a preset file
Presets in @ng-apimock/core are written in json. There is only one rule to follow when writing a preset file.
- It has a unique name
So writing a simple preset could look like this:
Writing a preset should always follow the json schema.
Selecting a preset can be done by using the available clients.