File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 6969 "jest-plugins" : " ^2.9.0" ,
7070 "jest-preset-loopback" : " ^1.0.0" ,
7171 "loopback-jest" : " ^1.3.0" ,
72+ "supertest" : " ^3.1.0" ,
7273 "tfilter" : " ^1.0.1" ,
7374 "through2" : " ^2.0.3" ,
7475 "tmp" : " 0.0.33" ,
Original file line number Diff line number Diff line change 11import server from '../../index' ;
2+ import request from 'supertest' ;
23
34describe ( 'Project Index' , ( ) => {
45 beforeEach ( ( done ) => {
@@ -8,11 +9,8 @@ describe('Project Index', () => {
89
910 afterEach ( ( ) => server . close ( ) ) ;
1011
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 ) ;
1715 } ) ;
1816} ) ;
You can’t perform that action at this time.
0 commit comments