Skip to content

Commit

Permalink
chore(consistancy): remove unnecessary assertions, update get-instanc…
Browse files Browse the repository at this point in the history
…e function name
  • Loading branch information
vikaspotluri123 committed Sep 5, 2018
1 parent fca4744 commit a6829d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/utils/get-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const checkValidInstall = require('./check-valid-install');
const {SystemError} = require('../errors');

function findInstance(instanceName, system, commandName) {
function getInstance(instanceName, system, commandName) {
const instance = system.getInstance(instanceName);

if (instanceName) {
Expand All @@ -19,4 +19,4 @@ function findInstance(instanceName, system, commandName) {
return instance;
}

module.exports = findInstance;
module.exports = getInstance;
2 changes: 1 addition & 1 deletion test/unit/commands/start-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Unit: Commands > Start', function () {
const stop = new StartCommand();

try {
stop.run({}).then(() => {throw new Error('Expected promise rejection')});
stop.run({});
expect(false, 'An error should have been thrown').to.be.true;
} catch (error) {
expect(error.message).to.equal('YES_IT_DOES');
Expand Down
2 changes: 1 addition & 1 deletion test/unit/commands/stop-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Unit: Commands > Stop', function () {
const stop = new StopCommand();

try {
stop.run({}).then(() => { throw new Error('Expected promise rejection') });
stop.run({});
expect(false, 'An error should have been thrown').to.be.true;
} catch (error) {
expect(error.message).to.equal('YES_IT_DOES');
Expand Down

0 comments on commit a6829d4

Please sign in to comment.