]> khamidou — GitHub mirrors - electron.git/commitdiff
spec: process.stdout.write
authorCheng Zhao <zcbenz@gmail.com>
Tue, 26 Jan 2016 12:26:42 +0000 (20:26 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 26 Jan 2016 12:26:42 +0000 (20:26 +0800)
spec/node-spec.js
spec/static/main.js

index c7a74efd6c70eb2cb4132b1dc582f2b339861fec..6f84f59921f984e15bd6c823ce19538cc9263f51 100644 (file)
@@ -190,17 +190,24 @@ describe('node feature', function() {
       return assert.equal(Buffer.byteLength(p.innerText), 13);
     });
   });
+
   describe('process.stdout', function() {
     it('should not throw exception', function() {
-      return process.stdout;
+      process.stdout;
     });
-    return xit('should have isTTY defined', function() {
-      return assert.equal(typeof process.stdout.isTTY, 'boolean');
+
+    it('should not throw exception when calling write()', function() {
+      process.stdout.write('test');
+    });
+
+    xit('should have isTTY defined', function() {
+      assert.equal(typeof process.stdout.isTTY, 'boolean');
     });
   });
-  return describe('vm.createContext', function() {
-    return it('should not crash', function() {
-      return require('vm').runInNewContext('');
+
+  describe('vm.createContext', function() {
+    it('should not crash', function() {
+      require('vm').runInNewContext('');
     });
   });
 });
index c49b2318de6a4f378bfea2576f9c3a97fcf8f403..4419a2219b0b62b0869f85940cd0daa35a7cf9aa 100644 (file)
@@ -28,6 +28,9 @@ app.commandLine.appendSwitch('disable-renderer-backgrounding');
 // sure we can reproduce it in renderer process.
 process.stdout;
 
+// Access console to reproduce #3482.
+console;
+
 ipcMain.on('message', function(event, arg) {
   event.sender.send('message', arg);
 });