File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,10 @@ describe("Multipart", function () {
135135 const parsedMultipart = Multipart . parse ( multipartBytes ) ;
136136 expect ( parsedMultipart ) . to . be . an . instanceof ( Multipart ) ;
137137 expect ( parsedMultipart . parts . length ) . to . equal ( 1 ) ;
138- expect ( new TextDecoder ( ) . decode ( parsedMultipart . parts [ 0 ] . bytes ( ) ) ) . to . equal ( "\r\n" ) ;
138+ const part = parsedMultipart . parts [ 0 ] ;
139+ expect ( part . bytes ( ) ) . to . deep . equal ( Multipart . CRLF ) ;
140+ expect ( part . headers ) . to . be . empty ;
141+ expect ( part . body ) . to . be . empty ;
139142 } ) ;
140143
141144 it ( "should handle parsing of empty parts in multipart MIME string" , function ( ) {
@@ -149,7 +152,10 @@ describe("Multipart", function () {
149152 const parsedMultipart = Multipart . parse ( multipartBytes ) ;
150153 expect ( parsedMultipart ) . to . be . an . instanceof ( Multipart ) ;
151154 expect ( parsedMultipart . parts . length ) . to . equal ( 1 ) ;
152- expect ( new TextDecoder ( ) . decode ( parsedMultipart . parts [ 0 ] . bytes ( ) ) ) . to . equal ( "\r\n" ) ;
155+ const part = parsedMultipart . parts [ 0 ] ;
156+ expect ( part . bytes ( ) ) . to . deep . equal ( Multipart . CRLF ) ;
157+ expect ( part . headers ) . to . be . empty ;
158+ expect ( part . body ) . to . be . empty ;
153159 } ) ;
154160
155161 it ( "should ignore linear whitespace after boundary delimiter" , function ( ) {
You can’t perform that action at this time.
0 commit comments