Skip to content

Commit

Permalink
Merge pull request #502 from ahmacleod/fix/init-package-json-test
Browse files Browse the repository at this point in the history
fix(init): fix test for corber presence in package.json
  • Loading branch information
alexblom authored Jun 1, 2018
2 parents 60f49d9 + cfc2d00 commit f195431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = Command.extend({

validateAndRun() {
let versions = getVersions(this.project.root);
if (versions.corber.project !== undefined) {
if (versions.corber.project.required !== undefined) {
throw `You cannot use ${chalk.green('corber init')} if corber is ` +
'already present in your project\'s package.json';
}
Expand Down
4 changes: 3 additions & 1 deletion node-tests/unit/commands/init-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ describe('Init Command', function() {
td.replace('../../../lib/utils/get-versions', () => {
return {
corber: {
project: '1.0.0'
project: {
required: '1.0.0'
}
}
};
});
Expand Down

0 comments on commit f195431

Please sign in to comment.