Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 3a752aa

Browse files
author
Jan Krems
committed
feat: kill
1 parent 9ee9f90 commit 3a752aa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/internal/inspect-repl.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ function createRepl(inspector) {
611611
return inspector.run();
612612
},
613613

614+
get kill() {
615+
return inspector.killChild();
616+
},
617+
614618
get restart() {
615619
return inspector.run();
616620
},

test/cli/launch.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ test('run after quit / restart', (t) => {
7070
t.match(cli.output, 'break in examples/three-lines.js:1',
7171
'is back at the beginning');
7272
})
73+
.then(() => cli.command('kill'))
74+
.then(() => cli.command('cont'))
75+
.then(() => cli.waitFor(/start the app/))
76+
.then(() => {
77+
t.match(cli.output, 'Use `run` to start the app again');
78+
})
79+
.then(() => cli.stepCommand('run'))
80+
.then(() => cli.waitForPrompt())
81+
.then(() => {
82+
t.match(cli.output, 'break in examples/three-lines.js:1',
83+
'is back at the beginning');
84+
})
7385
.then(() => cli.quit())
7486
.then(null, onFatal);
7587
});

0 commit comments

Comments
 (0)