UNPKG

@loopback/docs

Version:
34 lines (21 loc) 1.01 kB
--- lang: en title: 'API docs: testlab.createrestappclient' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.testlab.createrestappclient.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/testlab](./testlab.md) &gt; [createRestAppClient](./testlab.createrestappclient.md) ## 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. <b>Signature:</b> ```typescript export declare function createRestAppClient(app: RestApplicationLike): supertest.SuperTest<supertest.Test>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | app | <code>RestApplicationLike</code> | A running (listening) instance of a RestApplication. | <b>Returns:</b> `supertest.SuperTest<supertest.Test>`