Skip to content

horsenuggets/testable

Repository files navigation

testable

A Luau testing framework based off of TestEZ. Testable extends TestEZ with parallel test execution and support for Lune, allowing you to run tests outside of the Roblox environment.

Usage

local Testable = require("@devpackages/testable")

local testRoot = path.to.Tests
local results, passed = Testable.run({ testRoot })

if passed then
    print("All tests passed!")
else
    print("Some tests failed.")
end

See the TestEZ documentation for details on writing tests.

Configuration

Configure Testable using Testable.configure():

local Testable = require("@devpackages/testable")

Testable.configure({
    AlphabeticalSort = false,  -- Sort test results alphabetically
    Indent = "   ",            -- Indentation string for test output
    MaxConcurrency = 4,        -- Maximum parallel tests
    Parallel = true,           -- Enable parallel test execution
    PrintSkipped = false,      -- Show skipped tests in output
    Verbose = false,           -- Enable verbose logging
})
Option Type Default Description
AlphabeticalSort boolean false Sort test results alphabetically instead of definition order
Indent string " " Indentation string used for nested test output
MaxConcurrency number 4 Maximum number of tests to run in parallel
Parallel boolean true Enable or disable parallel test execution
PrintSkipped boolean false Include skipped tests in the output
Verbose boolean false Enable detailed logging during test execution

Reset configuration to defaults with Testable.resetConfig().

About

A Luau testing framework based off of TestEZ.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages