diff options
Diffstat (limited to 'deps/node-inspect/test/cli/exceptions.test.js')
-rw-r--r-- | deps/node-inspect/test/cli/exceptions.test.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/deps/node-inspect/test/cli/exceptions.test.js b/deps/node-inspect/test/cli/exceptions.test.js index b66c09fc50..18b7f1855e 100644 --- a/deps/node-inspect/test/cli/exceptions.test.js +++ b/deps/node-inspect/test/cli/exceptions.test.js @@ -14,17 +14,19 @@ test('break on (uncaught) exceptions', (t) => { throw error; } - return cli.waitFor(/break/) + return cli.waitForInitialBreak() .then(() => cli.waitForPrompt()) .then(() => { t.match(cli.output, `break in ${script}:1`); }) // making sure it will die by default: .then(() => cli.command('c')) - .then(() => cli.waitFor(/disconnect/)) + // TODO: Remove FATAL ERROR once node doesn't show a FATAL ERROR anymore + .then(() => cli.waitFor(/disconnect|FATAL ERROR/)) // Next run: With `breakOnException` it pauses in both places .then(() => cli.stepCommand('r')) + .then(() => cli.waitForInitialBreak()) .then(() => { t.match(cli.output, `break in ${script}:1`); }) @@ -41,6 +43,7 @@ test('break on (uncaught) exceptions', (t) => { // Next run: With `breakOnUncaught` it only pauses on the 2nd exception .then(() => cli.command('breakOnUncaught')) .then(() => cli.stepCommand('r')) // also, the setting survives the restart + .then(() => cli.waitForInitialBreak()) .then(() => { t.match(cli.output, `break in ${script}:1`); }) @@ -52,11 +55,13 @@ test('break on (uncaught) exceptions', (t) => { // Next run: Back to the initial state! It should die again. .then(() => cli.command('breakOnNone')) .then(() => cli.stepCommand('r')) + .then(() => cli.waitForInitialBreak()) .then(() => { t.match(cli.output, `break in ${script}:1`); }) .then(() => cli.command('c')) - .then(() => cli.waitFor(/disconnect/)) + // TODO: Remove FATAL ERROR once node doesn't show a FATAL ERROR anymore + .then(() => cli.waitFor(/disconnect|FATAL ERROR/)) .then(() => cli.quit()) .then(null, onFatal); |