Skip to content

Commit

Permalink
Merge 6c6a13f into 932ef07
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed Jun 28, 2019
2 parents 932ef07 + 6c6a13f commit f67a7ed
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/routes/help.js
@@ -1,6 +1,6 @@
'use strict';
const inquirer = require('inquirer');
const opn = require('opn');
const open = require('open');

module.exports = app => {
app.insight.track('yoyo', 'help');
Expand Down Expand Up @@ -31,6 +31,6 @@ module.exports = app => {
return;
}

opn(answer.whereTo);
open(answer.whereTo);
});
};
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -57,7 +57,7 @@
"lodash": "^4.17.10",
"meow": "^3.0.0",
"npm-keyword": "^5.0.0",
"opn": "^5.3.0",
"open": "^6.3.0",
"package-json": "^5.0.0",
"parse-help": "^1.0.0",
"read-pkg-up": "^4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/route-help.js
Expand Up @@ -12,9 +12,9 @@ describe('help route', () => {
this.homeRoute = sinon.spy();
this.router = new Router(sinon.stub(), this.insight);
this.router.registerRoute('home', this.homeRoute);
this.opn = sinon.stub();
this.open = sinon.stub();
const helpRoute = proxyquire('../lib/routes/help', {
opn: this.opn
open: this.open
});
this.router.registerRoute('help', helpRoute);
});
Expand Down Expand Up @@ -42,8 +42,8 @@ describe('help route', () => {
const url = 'http://yeoman.io';
this.sandbox.stub(inquirer, 'prompt').returns(Promise.resolve({whereTo: url}));
return this.router.navigate('help').then(() => {
sinon.assert.calledWith(this.opn, url);
sinon.assert.calledOnce(this.opn);
sinon.assert.calledWith(this.open, url);
sinon.assert.calledOnce(this.open);
});
});
});

0 comments on commit f67a7ed

Please sign in to comment.