Watch
1
0
Fork
You've already forked suite
0
dead simple test suite for luau
  • Luau 100%
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026年03月11日 11:45:19 +01:00
LICENSE Initial commit 2026年03月10日 16:01:07 +01:00
README.md Update README.md 2026年03月10日 16:04:21 +01:00
suite.luau type error go brrrr 2026年03月11日 11:45:19 +01:00

suite

Dead simple test suite for Luau.

Usage

local test = require("./suite")
local suite = test.new()
test.group(suite, "math", function()
 test.equal(suite, "addition", 1 + 1, 2)
 test.gt(suite, "pi", math.pi, 3)
 test.near(suite, "sqrt2", math.sqrt(2), 1.41421, 0.001)
end)
test.group(suite, "strings", function()
 test.equal(suite, "length", #"hello", 5)
 test.not_equal(suite, "different", "a", "b")
 test.truthy(suite, "non-empty", #"x" > 0)
end)
test.group(suite, "errors", function()
 test.fails(suite, "index nil", function()
 local t: any = nil
 local _ = t.x
 end)
end)
test.finish(suite)

output:

 PASS math (3)
 PASS strings (3)
 PASS errors (1)
7/7 passed, 3 groups (0.001s)