@@ -11,14 +11,12 @@ const {
1111 ArrayPrototypeSlice,
1212 ArrayPrototypeSome,
1313 ArrayPrototypeSort,
14- hardenRegExp,
1514 ObjectAssign,
1615 PromisePrototypeThen,
1716 SafePromiseAll,
1817 SafePromiseAllReturnVoid,
1918 SafePromiseAllSettledReturnVoid,
2019 PromiseResolve,
21- RegExpPrototypeSymbolSplit,
2220 SafeMap,
2321 SafeSet,
2422 StringPrototypeIndexOf,
@@ -74,7 +72,6 @@ const {
7472const kFilterArgs = [ '--test' , '--experimental-test-coverage' , '--watch' ] ;
7573const kFilterArgValues = [ '--test-reporter' , '--test-reporter-destination' ] ;
7674const kDiagnosticsFilterArgs = [ 'tests' , 'suites' , 'pass' , 'fail' , 'cancelled' , 'skipped' , 'todo' , 'duration_ms' ] ;
77- const kSplitLine = hardenRegExp ( / \r ? \n / ) ;
7875
7976const kCanceledTests = new SafeSet ( )
8077 . add ( kCancelledByParent ) . add ( kAborted ) . add ( kTestTimeoutFailure ) ;
@@ -300,15 +297,11 @@ class FileTest extends Test {
300297 }
301298
302299 if ( TypedArrayPrototypeGetLength ( nonSerialized ) > 0 ) {
303- const messages = RegExpPrototypeSymbolSplit ( kSplitLine , nonSerialized . toString ( 'utf-8' ) ) ;
304- for ( let i = 0 ; i < messages . length ; i ++ ) {
305- const message = messages [ i ] ;
306- this . addToReport ( {
307- __proto__ : null ,
308- type : 'test:stdout' ,
309- data : { __proto__ : null , file : this . name , message } ,
310- } ) ;
311- }
300+ this . addToReport ( {
301+ __proto__ : null ,
302+ type : 'test:stdout' ,
303+ data : { __proto__ : null , file : this . name , message : nonSerialized . toString ( 'utf-8' ) } ,
304+ } ) ;
312305 }
313306
314307 while ( bufferHead ?. length >= kSerializedSizeHeader ) {
@@ -385,7 +378,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
385378 subtest . addToReport ( {
386379 __proto__ : null ,
387380 type : 'test:stderr' ,
388- data : { __proto__ : null , file : path , message : line } ,
381+ data : { __proto__ : null , file : path , message : line + '\n' } ,
389382 } ) ;
390383 } ) ;
391384
0 commit comments