Skip to content

Commit

Permalink
Added tests for invalid and wildCard ranges with --newest option
Browse files Browse the repository at this point in the history
  • Loading branch information
vanodevium committed Nov 8, 2019
1 parent c6ff937 commit 15f1b33
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 15f1b33

Please sign in to comment.