Skip to content

Commit

Permalink
add test-case for ">10"
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed May 15, 2023
1 parent 96caece commit 99b6ebd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ test('>=12 should exit', function(t) {
t.end()
})

test('>10 should exit', function(t) {
pleaseUpgrade({
name: 'Lorem Ipsum',
engines: {
node: '>10'
}
})
t.equal(exitCode, 1)
t.equal(
errorMessage,
'Lorem Ipsum requires at least version 11.0.0 of Node, please upgrade'
)
t.end()
})

test('>=12.0.0 should exit', function(t) {
pleaseUpgrade({
name: 'Lorem Ipsum',
Expand Down

0 comments on commit 99b6ebd

Please sign in to comment.