| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a4ad989 commit c400448
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ const common = require('../common'); | |||
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | const cp = require('child_process'); | |
| 5 | 5 | const fs = require('fs'); | |
| 6 | + const util = require('util'); | ||
| 6 | 7 | ||
| 7 | 8 | if (!common.isMainThread) | |
| 8 | 9 | common.skip('process.chdir is not available in Workers'); | |
@@ -121,7 +122,8 @@ for (const tr in tests) { | |||
| 121 | 122 | const proc = cp.spawnSync(process.execPath, | |
| 122 | 123 | [ '--trace-events-enabled', | |
| 123 | 124 | '--trace-event-categories', 'node.fs.sync', | |
| 124 | - '-e', tests[tr] ]); | ||
| 125 | + '-e', tests[tr] ], | ||
| 126 | + { encoding: 'utf8' }); | ||
| 125 | 127 | // Some AIX versions don't support futimes or utimes, so skip. | |
| 126 | 128 | if (common.isAIX && proc.status !== 0 && tr === 'fs.sync.futimes') { | |
| 127 | 129 | continue; | |
@@ -131,7 +133,7 @@ for (const tr in tests) { | |||
| 131 | 133 | } | |
| 132 | 134 | ||
| 133 | 135 | // Make sure the operation is successful. | |
| 134 | - assert.strictEqual(proc.status, 0, tr + ': ' + proc.stderr); | ||
| 136 | + assert.strictEqual(proc.status, 0, `${tr}:\n${util.inspect(proc)}`); | ||
| 135 | 137 | ||
| 136 | 138 | // Confirm that trace log file is created. | |
| 137 | 139 | assert(common.fileExists(traceFile)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments