core.createtests
Home > @medplum/core > createTests
createTests() function
Produce an 'application/json-patch+json'-type list of tests, to verify that existing values in an object are identical to the those captured at some checkpoint (whenever this function is called).
This does not alter input or output unless they have a property getter with side-effects (which is not a good idea anyway).
Returns list of test operations.
Signature:
export declare function createTests(input: any, patch: Operation[]): TestOperation[];
Parameters
Parameter | Type | Description |
|---|---|---|
input | any | The input value. |
patch | The list of patch operations. |
Returns:
A list of test operations corresponding to the current values.