From bf5850a8dfc66e7c310270347a3ba63454e4e6dc Mon Sep 17 00:00:00 2001 From: Snorlax <57375992+SnorlaxAssist@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:52:53 +0000 Subject: [PATCH] Fix tests --- tests/Specs/coverage.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/Specs/coverage.lua b/tests/Specs/coverage.lua index 5ad4f61..02d4cd8 100644 --- a/tests/Specs/coverage.lua +++ b/tests/Specs/coverage.lua @@ -18,17 +18,21 @@ local module = Fiu.luau_deserialize(compileResult) - local success, err = pcall(Fiu.luau_getcoverage, module, nil, function() end) + local success, err = pcall(Fiu.luau_getcoverage) assert(not success, "Must fail") - assert(err == "proto must have debug enabled", "Error does not match") + assert(err:find("module must be a table$"), "Error does not match") + + success, err = pcall(Fiu.luau_getcoverage, module, nil, function() end) + assert(not success, "Must fail") + assert(err:find("proto must have debug enabled$"), "Error does not match") success, err = pcall(Fiu.luau_getcoverage, module, "string", function() end) assert(not success, "Must fail") - assert(err == "protoid must be a number or nil", "Error does not match") + assert(err:find("protoid must be a number or nil$"), "Error does not match") success, err = pcall(Fiu.luau_getcoverage, module, 1, "") assert(not success, "Must fail") - assert(err == "callback must be a function", "Error does not match") + assert(err:find("callback must be a function$"), "Error does not match") end --[[Full coverage: Level 2]] do