Skip to content

Commit

Permalink
Update bin-version-check package (#53) (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Logicer16 authored Jun 3, 2021
1 parent 3ead97d commit 820860a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rules/yo-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.verify = async () => {
const result = await binVersionCheck('yo', `>=${version}`);
return result;
} catch (error) {
if (error.name === 'InvalidBinVersion') {
if (error.name === 'InvalidBinaryVersion') {
return errors.oldYoVersion();
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
"dependencies": {
"ansi-styles": "^3.2.0",
"bin-version-check": "^3.0.0",
"bin-version-check": "^4.0.0",
"chalk": "^2.3.0",
"global-agent": "^2.0.0",
"global-tunnel-ng": "^2.5.3",
Expand Down
7 changes: 7 additions & 0 deletions test/rule-yo-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ describe('yo version', () => {
const error = await rule.verify();
assert(error, error);
});

it('fail if it\'s invalid version range', async () => {
latestVersion = {...latestVersion, then: cb => cb('-1')};

const error = await rule.verify();
assert(error, error);
});
});

0 comments on commit 820860a

Please sign in to comment.