Skip to content

Commit

Permalink
minor error output improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed Oct 28, 2021
1 parent 23fc540 commit c98d815
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/runner/test-runners/cucumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CucumberSuite extends TestSuite {
if (err.code === 'MODULE_NOT_FOUND') {
const error = new Error('Cucumber needs to be installed as a project dependency.');
error.showTrace = false;
error.detailedErr = 'You can install cucumber from NPM using:\n\n\t' + Logger.colors.light_green('npm i @cucumber/cucumber');
error.detailedErr = 'You can install cucumber from NPM using:\n\n ' + Logger.colors.light_green('npm i @cucumber/cucumber');

throw error;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/runner/test-runners/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class MochaRunner {
require('mochawesome-merge');
} catch (err) {
const error = new Error('Nightwatch needs some more packages when running in parallel and using the mochawesome reporter:');
error.detailedErr = 'To install dependencies, please run:\n\tnpm install mochawesome-report-generator mochawesome-merge --save-dev';
error.detailedErr = 'To install dependencies, please run:\n npm install mochawesome-report-generator mochawesome-merge --save-dev';

throw error;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BaseService {
let binaryMissing = `${this.serviceName} cannot be found in the current project.`;

if (this.npmPackageName) {
binaryMissing += '\n\n ' + Logger.colors.yellow(`You can either install ${this.npmPackageName} from NPM: \n\tnpm install ${this.npmPackageName} --save-dev\n\n`) + ' or ';
binaryMissing += '\n\n ' + Logger.colors.yellow(`You can either install ${this.npmPackageName} from NPM: \n npm install ${this.npmPackageName} --save-dev\n\n`) + ' or ';
} else {
binaryMissing += '\n\n Please ';
}
Expand Down

0 comments on commit c98d815

Please sign in to comment.