@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
35 lines (22 loc) • 1.15 kB
Markdown
lang: en
title: 'API docs: testlab.createrestappclient'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/testlab
permalink: /doc/en/lb4/apidocs.testlab.createrestappclient.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/testlab](./testlab.md) > [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 | [RestApplicationLike](./testlab.restapplicationlike.md) | A running (listening) instance of a RestApplication. |
<b>Returns:</b>
supertest.SuperTest<supertest.Test>