32
32
assert . strictEqual ( e . errno , 'ETIMEDOUT' ) ;
33
33
err = e ;
34
34
} 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 } ` ) ;
36
37
assert . strictEqual ( caught , true , 'execSync should throw' ) ;
37
38
const end = Date . now ( ) - start ;
38
39
assert ( end < SLEEP ) ;
@@ -53,11 +54,11 @@ cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
53
54
ret = execSync ( cmd ) ;
54
55
55
56
assert . strictEqual ( ret . length , msgBuf . length ) ;
56
- assert . deepStrictEqual ( ret , msgBuf , 'execSync result buffer should match' ) ;
57
+ assert . deepStrictEqual ( ret , msgBuf ) ;
57
58
58
59
ret = execSync ( cmd , { encoding : 'utf8' } ) ;
59
60
60
- assert . strictEqual ( ret , `${ msg } \n` , 'execSync encoding result should match' ) ;
61
+ assert . strictEqual ( ret , `${ msg } \n` ) ;
61
62
62
63
const args = [
63
64
'-e' ,
@@ -69,8 +70,7 @@ assert.deepStrictEqual(ret, msgBuf);
69
70
70
71
ret = execFileSync ( process . execPath , args , { encoding : 'utf8' } ) ;
71
72
72
- assert . strictEqual ( ret , `${ msg } \n` ,
73
- 'execFileSync encoding result should match' ) ;
73
+ assert . strictEqual ( ret , `${ msg } \n` ) ;
74
74
75
75
// Verify that the cwd option works - GH #7824
76
76
{
0 commit comments