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