@@ -11,14 +11,12 @@ const {
11
11
ArrayPrototypeSlice,
12
12
ArrayPrototypeSome,
13
13
ArrayPrototypeSort,
14
- hardenRegExp,
15
14
ObjectAssign,
16
15
PromisePrototypeThen,
17
16
SafePromiseAll,
18
17
SafePromiseAllReturnVoid,
19
18
SafePromiseAllSettledReturnVoid,
20
19
PromiseResolve,
21
- RegExpPrototypeSymbolSplit,
22
20
SafeMap,
23
21
SafeSet,
24
22
StringPrototypeIndexOf,
@@ -75,7 +73,6 @@ const {
75
73
const kFilterArgs = [ '--test' , '--experimental-test-coverage' , '--watch' ] ;
76
74
const kFilterArgValues = [ '--test-reporter' , '--test-reporter-destination' ] ;
77
75
const kDiagnosticsFilterArgs = [ 'tests' , 'suites' , 'pass' , 'fail' , 'cancelled' , 'skipped' , 'todo' , 'duration_ms' ] ;
78
- const kSplitLine = hardenRegExp ( / \r ? \n / ) ;
79
76
80
77
const kCanceledTests = new SafeSet ( )
81
78
. add ( kCancelledByParent ) . add ( kAborted ) . add ( kTestTimeoutFailure ) ;
@@ -301,15 +298,11 @@ class FileTest extends Test {
301
298
}
302
299
303
300
if ( TypedArrayPrototypeGetLength ( nonSerialized ) > 0 ) {
304
- const messages = RegExpPrototypeSymbolSplit ( kSplitLine , nonSerialized . toString ( 'utf-8' ) ) ;
305
- for ( let i = 0 ; i < messages . length ; i ++ ) {
306
- const message = messages [ i ] ;
307
- this . addToReport ( {
308
- __proto__ : null ,
309
- type : 'test:stdout' ,
310
- data : { __proto__ : null , file : this . name , message } ,
311
- } ) ;
312
- }
301
+ this . addToReport ( {
302
+ __proto__ : null ,
303
+ type : 'test:stdout' ,
304
+ data : { __proto__ : null , file : this . name , message : nonSerialized . toString ( 'utf-8' ) } ,
305
+ } ) ;
313
306
}
314
307
315
308
while ( bufferHead ?. length >= kSerializedSizeHeader ) {
@@ -383,7 +376,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
383
376
subtest . addToReport ( {
384
377
__proto__ : null ,
385
378
type : 'test:stderr' ,
386
- data : { __proto__ : null , file : path , message : line } ,
379
+ data : { __proto__ : null , file : path , message : line + '\n' } ,
387
380
} ) ;
388
381
} ) ;
389
382
0 commit comments