Wisp¶
A lightweight and fast test framework for Luau.
Wisp gives you a chainable suite API, a readable assertion vocabulary, and a plain text report — in a few hundred lines of code, with no dependencies to install.
local Wisp = require("@wisp")
Wisp.suite("Calculator")
:action("adds numbers", function()
Wisp.assume(1 + 1):equalsTo(2)
end)
:action("throws on division by zero", function()
Wisp.assume(function()
error("divide by zero")
end):throws()
end)
Wisp()
Calculator
✓ adds numbers
✓ throws on division by zero
Suites: 1 passed out of 1 total
Tests: 2 passed out of 2 total
Took: 0.11ms
Features¶
- Chainable —
Suite:actionreturns the suite, so a whole test file reads as one expression. - Fluent assertions — build expectations by chaining onto
Wisp.assume(value). - Zero dependencies — a single folder you can require, sync, or vendor.
- Fails loudly, keeps going — a broken action is reported and the remaining actions still run.
- Typed — shipped
--!strictsource with atypes.d.luaudeclaration file.
At a glance¶
| Concept | What it is |
|---|---|
Wisp |
The module you require. Holds suite, assume, and is callable to run. |
Suite |
A named group of actions. Created by Wisp.suite(name). |
Action |
A single named test. The function body you write. |
Assertion |
A chainable expectation, created by Wisp.assume(value). |
Runner |
Collects suites, runs them, and prints the report. |
Where to go next¶
- Introduction — what Wisp is, and what it is not.
- Installation — add Wisp to a Rojo project.
- Your First Test — a five minute walkthrough.
- Assertions — the full catalogue of expectations.
- API Reference — every exported function, signature, and error.