@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
65 lines (34 loc) • 1.32 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.
**Signature:**
```typescript
export declare function createRestAppClient(app: RestApplicationLike): supertest.SuperTest<supertest.Test>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
app
</td><td markdown="1">
[RestApplicationLike](./testlab.restapplicationlike.md)
</td><td markdown="1">
A running (listening) instance of a RestApplication.
</td></tr>
</tbody></table>
**Returns:**
supertest.SuperTest<supertest.Test>