-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repl: don't use deprecated
domain
module
- Loading branch information
1 parent
89a2f56
commit 9be6f17
Showing
11 changed files
with
109 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
const repl = require('repl'); | ||
const { PassThrough } = require('stream'); | ||
|
||
// Setup input and output streams | ||
const firstInput = new PassThrough(); | ||
const secondInput = new PassThrough(); | ||
|
||
const firstREPL = repl.start({ input: firstInput, output: new PassThrough() }); | ||
const secondREPL = repl.start({ input: secondInput, output: new PassThrough() }); | ||
|
||
firstREPL._onEvalError = common.mustCall(); | ||
secondREPL._onEvalError = common.mustNotCall(); | ||
|
||
// Write commands to the REPL | ||
firstInput.write('setTimeout(() => { throw 1; }, 10);\n'); | ||
secondInput.write('1+1;\n'); | ||
|
||
setTimeout(() => { | ||
firstREPL.close(); | ||
secondREPL.close(); | ||
}, 11); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.