Skip to content

Commit

Permalink
fixup! fixup! test,debugger: migrate node-inspect tests to core
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Apr 9, 2021
1 parent 0675754 commit dce5476
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-backtrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-break.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-clear-breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-exec-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-heap-profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-low-level.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-preserve-breaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-sb-before-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-use-strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions test/inspector-cli/test-inspector-cli-watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dce5476

Please sign in to comment.