First Test
This page gets a single test running.
Start with a minimal lutest.toml:
[discovery]require = "@lib"roots = ["."]ignore = ["vendor", "luau_packages", ".git"]gitignore = trueNow create a module that registers one test:
local t = require("@lib")
t.test("adds numbers", function() assert(1 + 2 == 3)end)That is already a valid test module.
It can export anything, or nothing at all. Lutest does not require a module to return a suite object.
Run it like this:
lutest testIf you want to limit the run to specific locations, pass them explicitly:
lutest test srcAt this point, the important idea is small: Lutest looks for modules that depend on the configured package path, loads them, and turns each discovered module into one implicit suite.