test: print more infomation in locale test (#28040)
This commit is contained in:
parent
3270613bf7
commit
7e22523ed2
1 changed files with 7 additions and 1 deletions
|
@ -318,8 +318,14 @@ describe('command line switches', () => {
|
||||||
|
|
||||||
let output = '';
|
let output = '';
|
||||||
appProcess.stdout.on('data', (data) => { output += data; });
|
appProcess.stdout.on('data', (data) => { output += data; });
|
||||||
|
let stderr = '';
|
||||||
|
appProcess.stderr.on('data', (data) => { stderr += data; });
|
||||||
|
|
||||||
|
const [code, signal] = await emittedOnce(appProcess, 'exit');
|
||||||
|
if (code !== 0) {
|
||||||
|
throw new Error(`Process exited with code "${code}" signal "${signal}" output "${output}" stderr "${stderr}"`);
|
||||||
|
}
|
||||||
|
|
||||||
await emittedOnce(appProcess.stdout, 'end');
|
|
||||||
output = output.replace(/(\r\n|\n|\r)/gm, '');
|
output = output.replace(/(\r\n|\n|\r)/gm, '');
|
||||||
expect(output).to.equal(result);
|
expect(output).to.equal(result);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue