@@ -28,9 +28,9 @@ describe("", () => {
2828 } ) ;
2929
3030 it ( "returns undefined if body is not present" , async ( ) => {
31- let body = "initial" ;
31+ let body : string | undefined = "initial" ;
3232 app . use ( "/" , eventHandler ( async ( request ) => {
33- body = ( await readRawBody ( request ) ) ! ;
33+ body = await readRawBody ( request ) ;
3434 return "200" ;
3535 } ) ) ;
3636 const result = await request . post ( "/api/test" ) ;
@@ -40,9 +40,9 @@ describe("", () => {
4040 } ) ;
4141
4242 it ( "returns an empty string if body is empty" , async ( ) => {
43- let body = "initial" ;
43+ let body : string | undefined = "initial" ;
4444 app . use ( "/" , eventHandler ( async ( request ) => {
45- body = ( await readRawBody ( request ) ) ! ;
45+ body = await readRawBody ( request ) ;
4646 return "200" ;
4747 } ) ) ;
4848 const result = await request . post ( "/api/test" ) . send ( "\"\"" ) ;
@@ -52,9 +52,9 @@ describe("", () => {
5252 } ) ;
5353
5454 it ( "returns an empty object string if body is empty object" , async ( ) => {
55- let body = "initial" ;
55+ let body : string | undefined = "initial" ;
5656 app . use ( "/" , eventHandler ( async ( request ) => {
57- body = ( await readRawBody ( request ) ) ! ;
57+ body = await readRawBody ( request ) ;
5858 return "200" ;
5959 } ) ) ;
6060 const result = await request . post ( "/api/test" ) . send ( { } ) ;
0 commit comments