5353 assert . strictEqual ( e . errno , 'ETIMEDOUT' ) ;
5454 err = e ;
5555} finally {
56- assert . strictEqual ( ret , undefined , 'we should not have a return value' ) ;
56+ assert . strictEqual ( ret , undefined ,
57+ `should not have a return value, received ${ ret } ` ) ;
5758 assert . strictEqual ( caught , true , 'execSync should throw' ) ;
5859 const end = Date . now ( ) - start ;
5960 assert ( end < SLEEP ) ;
@@ -74,11 +75,11 @@ cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
7475ret = execSync ( cmd ) ;
7576
7677assert . strictEqual ( ret . length , msgBuf . length ) ;
77- assert . deepStrictEqual ( ret , msgBuf , 'execSync result buffer should match' ) ;
78+ assert . deepStrictEqual ( ret , msgBuf ) ;
7879
7980ret = execSync ( cmd , { encoding : 'utf8' } ) ;
8081
81- assert . strictEqual ( ret , `${ msg } \n` , 'execSync encoding result should match' ) ;
82+ assert . strictEqual ( ret , `${ msg } \n` ) ;
8283
8384const args = [
8485 '-e' ,
@@ -90,8 +91,7 @@ assert.deepStrictEqual(ret, msgBuf);
9091
9192ret = execFileSync ( process . execPath , args , { encoding : 'utf8' } ) ;
9293
93- assert . strictEqual ( ret , `${ msg } \n` ,
94- 'execFileSync encoding result should match' ) ;
94+ assert . strictEqual ( ret , `${ msg } \n` ) ;
9595
9696// Verify that the cwd option works - GH #7824
9797{
0 commit comments