Skip to content

Commit

Permalink
Forward some of the messages from serve command to the stdoutput
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Feb 27, 2024
1 parent 6a0ad79 commit 6d7af38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ serve.handler = async function(argv) {
"to a target system for third parties on your network"));
process.stderr.write("\n\n");
}
process.stderr.write("Server started");
process.stderr.write("\n");
process.stderr.write("URL: " + browserUrl);
process.stderr.write("\n");
process.stdout.write("Server started");
process.stdout.write("\n");
process.stdout.write("URL: " + browserUrl);
process.stdout.write("\n");

if (argv.open !== undefined) {
if (typeof argv.open === "string") {
Expand Down
4 changes: 4 additions & 0 deletions test/lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ test.beforeEach(async (t) => {
// NOTE: This fake impl only supports one string arg passed to console.log
t.context.consoleOutput += message;
});
t.context.processStdoutWrite = sinon.stub(process.stdout, "write").callsFake((message) => {
// NOTE: This fake impl only supports one string arg passed to console.log
t.context.consoleOutput += message;
});

t.context.open = sinon.stub();

Expand Down

0 comments on commit 6d7af38

Please sign in to comment.