test: refactor test-debugger-remote
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test
Description of change
-
The test doesn't attach an event listener for
exit
events and removes them before killing. The intention is to fail the tests if the processes exit normally. This patch attaches theexit
event handlers. -
Replace
var
s withlet
s andconst
s. -
Replace
==
based assertion withstrictEqual
assertion. -
Use
common.PORT
instead of5959
. -
The test used to expect only one string "connecting to localhost:5959 ... ok", but the debugger actually emits another string, "break in test/fixtures/empty.js:2". This patch asserts if both of them are received in the same order.