Skip to content

Commit 9705d5e

Browse files
committed
fixup! repl: don't use deprecated domain module
1 parent fb9057d commit 9705d5e

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/parallel/test-repl-save-load.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const putIn = new ArrayStream();
3535
const testMe = repl.start('', putIn);
3636

3737
// Some errors might be passed to the domain.
38-
testMe._domain.on('error', function(reason) {
38+
testMe._onEvalError = function(reason) {
3939
const err = new Error('Test failed');
4040
err.reason = reason;
4141
throw err;
42-
});
42+
};
4343

4444
const testFile = [
4545
'let inner = (function() {',

test/parallel/test-repl-tab-complete-import.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const testMe = repl.start({
2626
});
2727

2828
// Some errors are passed to the domain, but do not callback
29-
testMe._domain.on('error', assert.ifError);
29+
testMe._onEvalError = assert.ifError;
3030

3131
// Tab complete provides built in libs for import()
3232
testMe.complete('import(\'', common.mustCall((error, data) => {

test/parallel/test-repl-tab-complete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const testMe = repl.start({
6161
});
6262

6363
// Some errors are passed to the domain, but do not callback
64-
testMe._domain.on('error', assert.ifError);
64+
testMe._onEvalError = assert.ifError;
6565

6666
// Tab Complete will not break in an object literal
6767
putIn.run([

test/parallel/test-repl-tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const testMe = repl.start('', putIn, function(cmd, context, filename,
1111
callback(null, cmd);
1212
});
1313

14-
testMe._domain.on('error', common.mustNotCall());
14+
testMe._onEvalError = common.mustNotCall();
1515

1616
testMe.complete('', function(err, results) {
1717
assert.strictEqual(err, null);

0 commit comments

Comments
 (0)