Skip to main content

Create preset

Makes sure that @ng-apimock/core a new preset will be created.


createPreset(name, includeMocks, includeVariables);


namestringname of the preset
includeMocksbooleaninclude current mock state
includeVariablesbooleaninclude current variables


createPreset('awesome-flow', true, true); 

Executing this will create a preset awesome-flow. When including mocks, the current state of the mocks will be used in the preset. When including variables, the current variables will be used in the preset.

You need to at least include mocks or variables, otherwise the preset will not be created.