Use this for writing automated tests for your data connector
Extends
Constructors
new MockDataConnectorClient()
new MockDataConnectorClient(): MockDataConnectorClient
Returns
Overrides
DataConnectorClient
.constructor
Properties
dataSourceClient
readonly dataSourceClient: MockDataSourceClient;
set properties on this to modify how data source updates are mocked
urls
urls: object = LUCID_URLS;
api
api: string;
main
main: string;
Inherited from
Methods
getPublicKey()
getPublicKey(): Promise<string>
Mocked version returns an empty string
Returns
Promise
<string
>
Overrides
DataConnectorClient
.getPublicKey
getSignatureValidator()
getSignatureValidator(): Promise<SignatureValidator>
Mocked version just always returns successful
Returns
Promise
<SignatureValidator
>
Overrides
DataConnectorClient
.getSignatureValidator
parseActions()
parseActions<P>(
url,
headers,
actions,
patchParser): Promise<undefined | DataConnectorAction[]>
Validate and parse an action request from Lucid
Type parameters
Type parameter |
---|
P extends Patch |
Parameters
Parameter | Type |
---|---|
url | string |
headers | Record <string , unknown > |
actions | unknown |
patchParser | PatchParser <P > |
Returns
Promise
<undefined
| DataConnectorAction
[]>