3232 assert . strictEqual ( e . errno , 'ETIMEDOUT' ) ;
3333 err = e ;
3434} finally {
35- assert . strictEqual ( ret , undefined , 'we should not have a return value' ) ;
35+ assert . strictEqual ( ret , undefined ,
36+ `should not have a return value, received ${ ret } ` ) ;
3637 assert . strictEqual ( caught , true , 'execSync should throw' ) ;
3738 const end = Date . now ( ) - start ;
3839 assert ( end < SLEEP ) ;
@@ -53,11 +54,11 @@ cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
5354ret = execSync ( cmd ) ;
5455
5556assert . strictEqual ( ret . length , msgBuf . length ) ;
56- assert . deepStrictEqual ( ret , msgBuf , 'execSync result buffer should match' ) ;
57+ assert . deepStrictEqual ( ret , msgBuf ) ;
5758
5859ret = execSync ( cmd , { encoding : 'utf8' } ) ;
5960
60- assert . strictEqual ( ret , `${ msg } \n` , 'execSync encoding result should match' ) ;
61+ assert . strictEqual ( ret , `${ msg } \n` ) ;
6162
6263const args = [
6364 '-e' ,
@@ -69,8 +70,7 @@ assert.deepStrictEqual(ret, msgBuf);
6970
7071ret = execFileSync ( process . execPath , args , { encoding : 'utf8' } ) ;
7172
72- assert . strictEqual ( ret , `${ msg } \n` ,
73- 'execFileSync encoding result should match' ) ;
73+ assert . strictEqual ( ret , `${ msg } \n` ) ;
7474
7575// Verify that the cwd option works - GH #7824
7676{
0 commit comments