Skip to content

Commit

Permalink
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 10, 2021
1 parent 0e6fba5 commit 1069e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/common/inspector-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function startCLI(args, flags = [], spawnOpts = {}) {
return output;
},

waitFor(pattern, timeout = 5000) {
waitFor(pattern, timeout = 2000) {
function checkPattern(str) {
if (Array.isArray(pattern)) {
return pattern.every((p) => p.test(str));
Expand Down Expand Up @@ -90,11 +90,11 @@ function startCLI(args, flags = [], spawnOpts = {}) {
});
},

waitForPrompt(timeout = 5000) {
waitForPrompt(timeout = 2000) {
return this.waitFor(/>\s+$/, timeout);
},

waitForInitialBreak(timeout = 5000) {
waitForInitialBreak(timeout = 2000) {
return this.waitFor(/break (?:on start )?in/i, timeout)
.then(() => {
if (isPreBreak(this.output)) {
Expand Down
2 changes: 1 addition & 1 deletion test/inspector-cli/test-inspector-cli-launch-ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const assert = require('assert');
{
const script = fixtures.path('inspector-cli', 'three-lines.js');

const cli = startCLI([script], ['--inspect-port=0']);
const cli = startCLI(['--inspect-port=0', script]);

cli.waitForInitialBreak()
.then(() => cli.waitForPrompt())
Expand Down

0 comments on commit 1069e36

Please sign in to comment.