mirror of
https://github.com/TangentFoxy/semver.lua.git
synced 2025-07-27 18:42:21 +00:00
added extra test for error checking
This commit is contained in:
@@ -39,7 +39,7 @@ context('semver', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('errors are thrown in', function()
|
||||
describe('errors', function()
|
||||
test('no parameters are passed', function()
|
||||
assert_error(function() v() end)
|
||||
end)
|
||||
@@ -62,6 +62,9 @@ context('semver', function()
|
||||
test('garbage at the end of the string', function()
|
||||
assert_error(function() v("1.2.3foobar") end)
|
||||
end)
|
||||
test('a non-string or number is passed', function()
|
||||
assert_error(function() v({}) end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user