This is the source for the npm package called
This package is meant to be used as a fake HTTP Service when testing the Kentico Kontent Delivery SDK and Kentico Kontent Management SDK. It is basically an implementation of IHttpService that could be used when configuring the Delivery client or configuring Management client.
npm install @kentico/kontent-test-http-service-js
This it the example of the usage. The object
fakeResponseConfig could contain multiple entries. An entry is chosen by matching the request url against the regular expression pattern provided as a key.
The full example is in delivery client tests.
fakeResponseConfig.set// THIS IS A PATTERN THAT WOULD BE USED FOR MATCHING WHEN// QUERYING THE DATA AGAINST THE URL/https:\/\/deliver.kontent.ai\/.*\/items/,;;;
Ondřej Chrastina — @Simply007