mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added tests for lume.chain()
This commit is contained in:
parent
330779fb0f
commit
098754056a
@ -393,6 +393,13 @@ tests["lume.rgba"] = function()
|
|||||||
testeq( b, 0x78 )
|
testeq( b, 0x78 )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- lume.chain
|
||||||
|
tests["lume.chain"] = function()
|
||||||
|
local t = lume.chain({1, 2}):map(function(x) return x * 2 end):result()
|
||||||
|
testeq( t, { 2, 4 } )
|
||||||
|
testeq( lume.chain(10):result(), 10 )
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
tester.dotests(tests)
|
tester.dotests(tests)
|
||||||
tester.test.global()
|
tester.test.global()
|
||||||
|
Loading…
Reference in New Issue
Block a user