Page Contents

Home > @loopback/testlab > createRestAppClient

createRestAppClient() function

Create a SuperTest client for a running RestApplication instance. It is the responsibility of the caller to ensure that the app is running and to stop the application after all tests are done.

Signature:

export declare function createRestAppClient(app: RestApplicationLike): supertest.SuperTest<supertest.Test>;

Parameters

Parameter Type Description
app RestApplicationLike A running (listening) instance of a RestApplication.

Returns:

supertest.SuperTest<supertest.Test>