()
| 35 | } |
| 36 | |
| 37 | function parent() { |
| 38 | const spawn = require('child_process').spawn; |
| 39 | const child = spawn(process.execPath, [__filename, 'child']); |
| 40 | |
| 41 | let output = ''; |
| 42 | |
| 43 | child.stderr.on('data', function(c) { |
| 44 | output += c; |
| 45 | }); |
| 46 | |
| 47 | child.stderr.setEncoding('utf8'); |
| 48 | |
| 49 | child.stderr.on('end', common.mustCall(() => { |
| 50 | assert.strictEqual(output, `I can still debug!${os.EOL}`); |
| 51 | console.log('ok - got expected message'); |
| 52 | })); |
| 53 | |
| 54 | child.on('exit', common.mustCall(function(c) { |
| 55 | assert(!c); |
| 56 | console.log('ok - child exited nicely'); |
| 57 | })); |
| 58 | } |
| 59 | |
| 60 | function child() { |
| 61 | // Even when all hope is lost... |
no test coverage detected
searching dependent graphs…