mirror of
https://github.com/britzl/monarch.git
synced 2025-09-28 10:32:21 +02:00
Cleaned up callback tests
Fixes #
This commit is contained in:
12
test/msg.lua
12
test/msg.lua
@@ -64,5 +64,17 @@ function M.last(url)
|
||||
return messages[#messages]
|
||||
end
|
||||
|
||||
function M.filter(url, fn)
|
||||
local t = {}
|
||||
local messages = M.messages(url)
|
||||
for i=1,#messages do
|
||||
local message = messages[i]
|
||||
if fn(message) then
|
||||
t[#t + 1] = message
|
||||
end
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user