Skip to content

Commit

Permalink
[Chore] Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v2a committed Dec 29, 2018
1 parent 13b4db3 commit 5613154
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions Commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ module.exports = {

})

.catch(function catchError(error) {
utils.displayError(error, res);
});
.catch(function catchError(error) {
utils.displayError(error, res);
});

}
};
Expand Down
8 changes: 4 additions & 4 deletions Commands/laravelConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ var nodeConfig = function nodeConfig() {
transformer = require(appdir + '/lib/Config/' + toTransform);
loaded = true;
} catch (errorInUserLoad) {
error = 'cant find /lib/Config/' + toTransform + '.js';
error = `can't find /lib/Config/${toTransform}.js`;
}
if (loaded) {
try {
Expand All @@ -166,10 +166,10 @@ var nodeConfig = function nodeConfig() {
loaded = true;

} catch (errorCoreload) {
if (!error || error === 'cant find /lib/Config/' + toTransform + '.js') {
if (!error || error === `can't find /lib/Config/${toTransform}.js`) {
/* istanbul ignore else */
if (errorCoreload.code) {
error = 'cant find /lib/Config/' + toTransform + '.js';
error = `can't find /lib/Config/${toTransform}.js`;
} else {
error = errorCoreload.message;
}
Expand All @@ -179,7 +179,7 @@ var nodeConfig = function nodeConfig() {
}
if (!loaded) {
conf = laravelConfig[toTransform];
response.red('config ' + toTransform + ' not trandformed').ln();
response.red('config ' + toTransform + ' not transformed').ln();
response.red(error).ln();
}
var content = utils.formatConfig(conf);
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ app.logger.inspectOptions = {
};
/* istanbul ignore else*/
if (app.config('app.debug')) {
process.env.DEBUG = logPrefix + '*';
console.log('set env.debug to ' + logPrefix + '*');
process.env.DEBUG = logPrefix + ':*';
console.log('set env.debug to ' + logPrefix + ':*');
}

app.trans = require('i18n');
Expand Down
8 changes: 4 additions & 4 deletions lib/shell/lib/Shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* global app */
/*eslint no-magic-numbers: 0 */

var EventEmitter, Interface, Request, Response, shell, events, readline, styles;
var EventEmitter, Interface, Request, Response, shell, events, readline;

readline = require('readline');
events = require('events');
Expand Down Expand Up @@ -95,13 +95,13 @@ shell = (function exportShell(_super) {
process.chdir(settings.chdir);
}
console.log('init completed');
this.initialised = true;
this.initialized = true;
return this;
};

Shell.prototype.start = function start() {
if (!this.initialised) {
throw new Error('app not initialised run Shell.init()');
if (!this.initialized) {
throw new Error('app not initialized run Shell.init()');
}
console.debug('start app');
var command, noPrompt;
Expand Down
4 changes: 2 additions & 2 deletions test/Commands/testLaravelConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = {
};
app.start();
},
'test write transorm fail': function testMakeCommandFail(test) {
'test write transform fail': function testMakeCommandFail(test) {
var stdout = [];
bddStdin('');
process.argv = ['node', appdir + '/artisan', 'laravel:config'];
Expand Down Expand Up @@ -341,7 +341,7 @@ module.exports = {
process.stdin.destroy = function stdinDestroy() {
unhookIntercept();
var toTest = [
'config example not trandformed',
'config example not transformed',
'error in example file'
];
each(toTest, function eachToTest(value) {
Expand Down
10 changes: 5 additions & 5 deletions test/Commands/testModelsCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ var each = require('lodash/each');
var Config = require('../../lib/Config');
var debugLogger = require('debug-logger');
var database, core, bddStdin;
var globalApp;
module.exports = {
setUp: function setUp(callback) {
bddStdin = new BddStdin().type;
rewire('../utils/bootstrap');

globalApp = global.app;
app.configure(function configureApp() {
app.use(Shell.router({
shell: app
Expand All @@ -27,8 +28,8 @@ module.exports = {
callback();
},
tearDown: function tearDown(callback) {
app.config().set('database', database);
app.config().set('core', core);
globalApp.config().set('database', database);
globalApp.config().set('core', core);
callback();
},
'test model creator': function testModelsCreator(test) {
Expand Down Expand Up @@ -184,7 +185,6 @@ module.exports = {
if (typeof txt === 'string') {
stdout.push(txt.replace(/\u001b\[.*?m/g, ''));
}
// return '';
});
app.init({
chdir: appdir + '/'
Expand All @@ -200,7 +200,7 @@ module.exports = {
unhookIntercept();

var toTest = [
"ER_DBACCESS_DENIED_ERROR: Access denied for user 'testdb'@'localhost' to database 'notexist'"
"Access denied for user 'testdb'@'localhost' to database 'notexist'"
];
each(toTest, function eachToTest(value) {
test.ok(stdout.indexOf(value) > -1, value);
Expand Down
2 changes: 1 addition & 1 deletion test/bootstrap/testInitConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
},
'test env default': function testEnvDefault(test) {
test.expect(1);
test.equal(app.config().env('wiilNotExist', 'default'), 'default', 'env not match');
test.equal(app.config().env('willNotExist', 'default'), 'default', 'env not match');
test.done();
}

Expand Down
4 changes: 2 additions & 2 deletions test/lib/shell/plugins/testHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
};
app.start();
},
'test help plugin custom intoduction': function customIntroduction(test) {
'test help plugin custom introduction': function customIntroduction(test) {
var stdout = [];
process.argv = ['node', appdir + '/artisan'];
var unhookIntercept = intercept(function onIntercept(txt) {
Expand Down Expand Up @@ -110,7 +110,7 @@ module.exports = {
'<2argument> ',
'[<autre>] ',
'Arguments:',
' argument test [default: "default"]\n 2argument deuxieme argument \n autre [default: "pour"]\n',
' argument test [default: "default"]\n 2argument deuxieme argument \n autre [default: "pour"]\n',
'Options:',
'--option ',
'test:second',
Expand Down

0 comments on commit 5613154

Please sign in to comment.