File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { ShoppingApplication } from '../..' ;
2
2
import {
3
- createClientForHandler ,
3
+ createRestAppClient ,
4
4
givenHttpServerConfig ,
5
- supertest ,
5
+ Client ,
6
6
} from '@loopback/testlab' ;
7
- import { RestServer } from '@loopback/rest' ;
8
7
9
8
export interface setupApp {
10
9
app : ShoppingApplication ;
11
- client : supertest . SuperTest < supertest . Test > ;
10
+ client : Client ;
12
11
}
13
12
14
13
export async function setupApplication ( ) : Promise < setupApp > {
@@ -19,8 +18,7 @@ export async function setupApplication(): Promise<setupApp> {
19
18
await app . boot ( ) ;
20
19
await app . start ( ) ;
21
20
22
- const server = await app . getServer ( RestServer ) ;
23
- const client = createClientForHandler ( server . requestHandler ) ;
21
+ const client = createRestAppClient ( app ) ;
24
22
25
23
return { app, client} ;
26
24
}
Original file line number Diff line number Diff line change 4
4
// License text available at https://opensource.org/licenses/MIT
5
5
6
6
import { Client , expect } from '@loopback/testlab' ;
7
- import { RestServer } from '@loopback/rest' ;
8
7
import { ShoppingApplication } from '../..' ;
9
8
import { ShoppingCartRepository } from '../../src/repositories' ;
10
9
import { RedisDataSource } from '../../src/datasources' ;
You can’t perform that action at this time.
0 commit comments