mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
spec: process.stdout should not throw exception
This commit is contained in:
@@ -133,3 +133,7 @@ describe 'node feature', ->
|
||||
b = new Buffer(p.innerText)
|
||||
assert.equal b.toString(), 'Jøhänñéß'
|
||||
assert.equal Buffer.byteLength(p.innerText), 13
|
||||
|
||||
describe 'process.stdout', ->
|
||||
it 'should not throw exception', ->
|
||||
process.stdout
|
||||
|
||||
@@ -10,6 +10,11 @@ process.port = 0; // will be used by crash-reporter spec.
|
||||
app.commandLine.appendSwitch('js-flags', '--expose_gc');
|
||||
app.commandLine.appendSwitch('ignore-certificate-errors');
|
||||
|
||||
// Accessing stdout in the main process will result in the process.stdout
|
||||
// throwing UnknownSystemError in renderer process sometimes. This line makes
|
||||
// sure we can reproduce it in renderer process.
|
||||
process.stdout;
|
||||
|
||||
ipc.on('message', function(event, arg) {
|
||||
event.sender.send('message', arg);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user