mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
This reverts commit 1b4d9b8f6e
.
This commit is contained in:
parent
1b4d9b8f6e
commit
becc18b59f
@ -406,7 +406,8 @@ const handler = async function (argv) {
|
|||||||
return aSequence - bSequence;
|
return aSequence - bSequence;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.warn(chalk.yellow('Running Folder Recursively \n'));
|
console.log(chalk.yellow('Running Folder Recursively \n'));
|
||||||
|
|
||||||
bruJsons = getBruFilesRecursively(filename, testsOnly);
|
bruJsons = getBruFilesRecursively(filename, testsOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -460,7 +461,7 @@ const handler = async function (argv) {
|
|||||||
if (nextRequestIdx >= 0) {
|
if (nextRequestIdx >= 0) {
|
||||||
currentRequestIndex = nextRequestIdx;
|
currentRequestIndex = nextRequestIdx;
|
||||||
} else {
|
} else {
|
||||||
console.warn("Could not find request with name '" + nextRequestName + "'");
|
console.error("Could not find request with name '" + nextRequestName + "'");
|
||||||
currentRequestIndex++;
|
currentRequestIndex++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -470,7 +471,7 @@ const handler = async function (argv) {
|
|||||||
|
|
||||||
const summary = printRunSummary(results);
|
const summary = printRunSummary(results);
|
||||||
const totalTime = results.reduce((acc, res) => acc + res.response.responseTime, 0);
|
const totalTime = results.reduce((acc, res) => acc + res.response.responseTime, 0);
|
||||||
console.error(chalk.dim(chalk.grey(`Ran all requests - ${totalTime} ms`)));
|
console.log(chalk.dim(chalk.grey(`Ran all requests - ${totalTime} ms`)));
|
||||||
|
|
||||||
if (outputPath && outputPath.length) {
|
if (outputPath && outputPath.length) {
|
||||||
const outputDir = path.dirname(outputPath);
|
const outputDir = path.dirname(outputPath);
|
||||||
@ -493,14 +494,15 @@ const handler = async function (argv) {
|
|||||||
makeHtmlOutput(outputJson, outputPath);
|
makeHtmlOutput(outputJson, outputPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error(chalk.dim(chalk.grey(`Wrote results to ${outputPath}`)));
|
console.log(chalk.dim(chalk.grey(`Wrote results to ${outputPath}`)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (summary.failedAssertions + summary.failedTests + summary.failedRequests > 0) {
|
if (summary.failedAssertions + summary.failedTests + summary.failedRequests > 0) {
|
||||||
process.exit(constants.EXIT_STATUS.ERROR_FAILED_COLLECTION);
|
process.exit(constants.EXIT_STATUS.ERROR_FAILED_COLLECTION);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(chalk.red('Something went wrong: ' + err.message));
|
console.log('Something went wrong');
|
||||||
|
console.error(chalk.red(err.message));
|
||||||
process.exit(constants.EXIT_STATUS.ERROR_GENERIC);
|
process.exit(constants.EXIT_STATUS.ERROR_GENERIC);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user