File tree 2 files changed +5
-6
lines changed 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 69
69
"jest-plugins" : " ^2.9.0" ,
70
70
"jest-preset-loopback" : " ^1.0.0" ,
71
71
"loopback-jest" : " ^1.3.0" ,
72
+ "supertest" : " ^3.1.0" ,
72
73
"tfilter" : " ^1.0.1" ,
73
74
"through2" : " ^2.0.3" ,
74
75
"tmp" : " 0.0.33" ,
Original file line number Diff line number Diff line change 1
1
import server from '../../index' ;
2
+ import request from 'supertest' ;
2
3
3
4
describe ( 'Project Index' , ( ) => {
4
5
beforeEach ( ( done ) => {
@@ -8,11 +9,8 @@ describe('Project Index', () => {
8
9
9
10
afterEach ( ( ) => server . close ( ) ) ;
10
11
11
- it ( 'should serve client files' , ( done ) => {
12
- request ( server ) . get ( '/index.html' ) . end ( ( err , res ) => {
13
- expect ( err ) . toEqual ( null ) ;
14
- expect ( res ) . to . status ( 200 ) ;
15
- done ( ) ;
16
- } ) ;
12
+ it ( 'should serve client files' , async ( ) => {
13
+ const res = await request ( server ) . get ( '/index.html' ) ;
14
+ expect ( res . statusCode ) . toBe ( 200 ) ;
17
15
} ) ;
18
16
} ) ;
You can’t perform that action at this time.
0 commit comments