API: show url/script in output when you add a test (#4195)

This commit is contained in:
Peter Hedenskog 2024-06-20 09:14:29 +02:00 committed by GitHub
parent 197bbd2555
commit 1aef84f9a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ async function api(options) {
if (action === 'add' || action === 'addAndGetResult') {
const spinner = ora({
text: `Send test to ${hostname}`,
text: `Send test to ${hostname} testing ${options._[0]}`,
isSilent: options.api.silent
}).start();
@ -74,10 +74,10 @@ async function api(options) {
const data = await addTest(hostname, apiOptions);
const testId = JSON.parse(data).id;
spinner.color = 'yellow';
spinner.text = `Added test with id ${testId}`;
spinner.text = `Added test ${options._[0]} with id ${testId}`;
if (action === 'add') {
spinner.succeed(`Added test with id ${testId}`);
spinner.succeed(`Added test ${options._[0]} with id ${testId}`);
console.log(testId);
process.exit();
} else if (action === 'addAndGetResult') {