Skip to content

Commit

Permalink
fix: remove jq from report if jq is not used
Browse files Browse the repository at this point in the history
fixes #204
  • Loading branch information
ssmirr committed Feb 13, 2020
1 parent f5d53e3 commit de75ec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/inspect/checks/contains.js
Expand Up @@ -55,7 +55,7 @@ class ContainsCheck extends Check {

// Escape carriage returns and line breaks.
let results_string = results.string.replace('\r', '\\r').replace('\n', '\\n');
let message = chalk`{gray [${results.file}]} {white jq query:} {gray ${results.jq}} {white ${expected} contain${plural}:} {gray [${results_string}]} {white status:} {gray ${results.status}} {white message:} {gray ${results.message}}`;
let message = chalk`{gray [${results.file}]}${results.jq ? chalk` {white jq query:} {gray ${results.jq}} ` : ''}{white ${expected} contain${plural}:} {gray [${results_string}]} {white status:} {gray ${results.status}} {white message:} {gray ${results.message}}`;
this.reporter.report(message, results.status);
}
}
Expand Down

0 comments on commit de75ec5

Please sign in to comment.