more tests

This commit is contained in:
VorTechnix 2024-10-13 14:23:34 -07:00
parent ef1189e6db
commit cd8a034333
No known key found for this signature in database
GPG key ID: 091E91A69545D5BA
4 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,13 @@
local Notify = worldeditadditions_core.notify
return worldeditadditions.normalize_test("notify", {
params = "<message>",
description = "Sends message to player in all main notification formats (error, warn, ok, info).",
func = function(name, params_table)
local message = table.concat(params_table, " ")
Notify.error(name, message)
Notify.warn(name, message)
Notify.ok(name, message)
Notify.info(name, message)
Notify.custom(name, "@" .. name, "Good Job", "#FF00D7")
end
})

View file

@ -1,5 +1,6 @@
-- Test registry -- Test registry
local test_id_paths = { local test_id_paths = {
"credits.test.lua",
"notify.test.lua", "notify.test.lua",
-- "stacktrace.test.lua", -- "stacktrace.test.lua",
} }

View file

@ -8,5 +8,6 @@ return worldeditadditions.normalize_test("notify", {
Notify.warn(name, message) Notify.warn(name, message)
Notify.ok(name, message) Notify.ok(name, message)
Notify.info(name, message) Notify.info(name, message)
Notify.custom(name, "@" .. name, "Good Job", "#FF00D7")
end end
}) })