Skip to content

Commit

Permalink
Merge pull request #610 from webdevium/master
Browse files Browse the repository at this point in the history
Added tests for invalid and wildCard ranges with --newest option
  • Loading branch information
raineorshine authored Nov 8, 2019
2 parents 026ec05 + 15f1b33 commit ec85d80
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions test/test-ncu.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,47 @@ describe('npm-check-updates', function () {
});
});

it('should work with --newest option with any invalid or wildcard range', () => {
return Promise.all([
ncu.run({
jsonAll: true,
newest: true,
packageData: JSON.stringify({
dependencies: {
'del': ''
}
})
}),
ncu.run({
jsonAll: true,
newest: true,
packageData: JSON.stringify({
dependencies: {
'del': 'invalid range'
}
})
}),
ncu.run({
jsonAll: true,
newest: true,
packageData: JSON.stringify({
dependencies: {
'del': '*'
}
})
}),
ncu.run({
jsonAll: true,
newest: true,
packageData: JSON.stringify({
dependencies: {
'del': '~'
}
})
})
]);
});

it('should enable --engines-node matching ', () => {
return ncu.run({
jsonAll: true,
Expand Down

0 comments on commit ec85d80

Please sign in to comment.