From 7abbfed87db1dd5587187509f2c3178de2a6b5f3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 9 Apr 2021 06:48:54 -0700 Subject: [PATCH] fixup! fixup! test,debugger: migrate node-inspect tests to core --- test/inspector-cli/test-inspector-cli-backtrace.js | 2 ++ test/inspector-cli/test-inspector-cli-break.js | 2 ++ test/inspector-cli/test-inspector-cli-clear-breakpoints.js | 2 ++ test/inspector-cli/test-inspector-cli-exceptions.js | 2 ++ test/inspector-cli/test-inspector-cli-exec-scope.js | 2 ++ test/inspector-cli/test-inspector-cli-exec.js | 2 ++ test/inspector-cli/test-inspector-cli-heap-profiler.js | 2 ++ test/inspector-cli/test-inspector-cli-help.js | 2 ++ test/inspector-cli/test-inspector-cli-low-level.js | 2 ++ test/inspector-cli/test-inspector-cli-preserve-breaks.js | 2 ++ test/inspector-cli/test-inspector-cli-profile.js | 2 ++ test/inspector-cli/test-inspector-cli-run-after-quit-restart.js | 2 ++ test/inspector-cli/test-inspector-cli-sb-before-load.js | 2 ++ test/inspector-cli/test-inspector-cli-scripts.js | 2 ++ test/inspector-cli/test-inspector-cli-use-strict.js | 2 ++ test/inspector-cli/test-inspector-cli-watchers.js | 2 ++ 16 files changed, 32 insertions(+) diff --git a/test/inspector-cli/test-inspector-cli-backtrace.js b/test/inspector-cli/test-inspector-cli-backtrace.js index a705efe5fe4270..b9b06d69578ade 100644 --- a/test/inspector-cli/test-inspector-cli-backtrace.js +++ b/test/inspector-cli/test-inspector-cli-backtrace.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-break.js b/test/inspector-cli/test-inspector-cli-break.js index 50373541854fa1..f515edd5ed25a5 100644 --- a/test/inspector-cli/test-inspector-cli-break.js +++ b/test/inspector-cli/test-inspector-cli-break.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-clear-breakpoints.js b/test/inspector-cli/test-inspector-cli-clear-breakpoints.js index f85e33280c6dfd..ef488a928462b9 100644 --- a/test/inspector-cli/test-inspector-cli-clear-breakpoints.js +++ b/test/inspector-cli/test-inspector-cli-clear-breakpoints.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-exceptions.js b/test/inspector-cli/test-inspector-cli-exceptions.js index 324f6f6bde2bf2..5b38a1fcd29a2a 100644 --- a/test/inspector-cli/test-inspector-cli-exceptions.js +++ b/test/inspector-cli/test-inspector-cli-exceptions.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-exec-scope.js b/test/inspector-cli/test-inspector-cli-exec-scope.js index ef1455c0b6231e..8a270d37ad45b2 100644 --- a/test/inspector-cli/test-inspector-cli-exec-scope.js +++ b/test/inspector-cli/test-inspector-cli-exec-scope.js @@ -13,6 +13,8 @@ const assert = require('assert'); const cli = startCLI([fixtures.path('inspector-cli/backtrace.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-exec.js b/test/inspector-cli/test-inspector-cli-exec.js index c4f8dbc0642b7c..ea3ef63614a561 100644 --- a/test/inspector-cli/test-inspector-cli-exec.js +++ b/test/inspector-cli/test-inspector-cli-exec.js @@ -13,6 +13,8 @@ const assert = require('assert'); const cli = startCLI([fixtures.path('inspector-cli/alive.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-heap-profiler.js b/test/inspector-cli/test-inspector-cli-heap-profiler.js index b19b8e450cd875..440cdd772df7c0 100644 --- a/test/inspector-cli/test-inspector-cli-heap-profiler.js +++ b/test/inspector-cli/test-inspector-cli-heap-profiler.js @@ -19,6 +19,8 @@ const filename = 'node.heapsnapshot'; const cli = startCLI([fixtures.path('inspector-cli/empty.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-help.js b/test/inspector-cli/test-inspector-cli-help.js index f72d4960a75755..b41c79dba71149 100644 --- a/test/inspector-cli/test-inspector-cli-help.js +++ b/test/inspector-cli/test-inspector-cli-help.js @@ -12,6 +12,8 @@ const assert = require('assert'); const cli = startCLI([fixtures.path('inspector-cli/empty.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-low-level.js b/test/inspector-cli/test-inspector-cli-low-level.js index 5fafc7c361c33b..f99ddfa430c448 100644 --- a/test/inspector-cli/test-inspector-cli-low-level.js +++ b/test/inspector-cli/test-inspector-cli-low-level.js @@ -13,6 +13,8 @@ const assert = require('assert'); const scriptPattern = /^\* (\d+): \S+inspector-cli(?:\/|\\)three-lines\.js/m; function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-preserve-breaks.js b/test/inspector-cli/test-inspector-cli-preserve-breaks.js index d9839a9082585c..07eaf896e64eed 100644 --- a/test/inspector-cli/test-inspector-cli-preserve-breaks.js +++ b/test/inspector-cli/test-inspector-cli-preserve-breaks.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-profile.js b/test/inspector-cli/test-inspector-cli-profile.js index a683d78b06f204..e46ef3121b3e19 100644 --- a/test/inspector-cli/test-inspector-cli-profile.js +++ b/test/inspector-cli/test-inspector-cli-profile.js @@ -17,6 +17,8 @@ function delay(ms) { const cli = startCLI([fixtures.path('inspector-cli/empty.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js b/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js index 0e0233d1209d53..7b0ab01b27f9e4 100644 --- a/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js +++ b/test/inspector-cli/test-inspector-cli-run-after-quit-restart.js @@ -16,6 +16,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-sb-before-load.js b/test/inspector-cli/test-inspector-cli-sb-before-load.js index fe1923f884a1e0..374140571c670e 100644 --- a/test/inspector-cli/test-inspector-cli-sb-before-load.js +++ b/test/inspector-cli/test-inspector-cli-sb-before-load.js @@ -20,6 +20,8 @@ const path = require('path'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-scripts.js b/test/inspector-cli/test-inspector-cli-scripts.js index 3c634e4b80ac83..10c817f88ec629 100644 --- a/test/inspector-cli/test-inspector-cli-scripts.js +++ b/test/inspector-cli/test-inspector-cli-scripts.js @@ -14,6 +14,8 @@ const assert = require('assert'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-use-strict.js b/test/inspector-cli/test-inspector-cli-use-strict.js index 4fb33c9f3e58fa..90d19044056270 100644 --- a/test/inspector-cli/test-inspector-cli-use-strict.js +++ b/test/inspector-cli/test-inspector-cli-use-strict.js @@ -14,6 +14,8 @@ const assert = require('assert'); const cli = startCLI([script]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; } diff --git a/test/inspector-cli/test-inspector-cli-watchers.js b/test/inspector-cli/test-inspector-cli-watchers.js index ab39be6239ec26..84b070b69f057c 100644 --- a/test/inspector-cli/test-inspector-cli-watchers.js +++ b/test/inspector-cli/test-inspector-cli-watchers.js @@ -13,6 +13,8 @@ const assert = require('assert'); const cli = startCLI([fixtures.path('inspector-cli/break.js')]); function onFatal(error) { + // Print the error first because `cli.quit()` might throw something else. + console.error(`Error received: ${error}`); cli.quit(); throw error; }