Skip to content

Commit

Permalink
fix: fix error formatting when no tests were found (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr authored Aug 5, 2024
1 parent 7e6203b commit 558e4d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test-reader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function validateTests(testsByBro, options) {
return;
}

const stringifiedOpts = convertOptions(options);
const stringifiedOpts = convertOptions(_.omit(options, "replMode"));
if (_.isEmpty(stringifiedOpts)) {
throw new Error(`There are no tests found. Try to specify [${Object.keys(options).join(", ")}] options`);
} else {
Expand All @@ -81,7 +81,7 @@ function validateTests(testsByBro, options) {
function convertOptions(obj) {
let result = "";
for (let key of _.keys(obj)) {
if (!_.isEmpty(obj[key])) {
if (!_.isEmpty(obj[key]) || obj[key] instanceof RegExp) {
if (_.isArray(obj[key])) {
result += `- ${key}: ${obj[key].join(", ")}\n`;
} else {
Expand Down

0 comments on commit 558e4d1

Please sign in to comment.