Midori
Functions
runTests
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. YieldsTypes
interface Config {showTimeoutWarning: boolean?--
If true, a warning will show if a test runs longer than timeoutWarningDelay
timeoutWarningDelay: number?--
Time in seconds for a test to show a timeout warning
concurrent: boolean?--
If true, all tests will run concurrently
}Runs the tests found in all the .test modules inside of the root instance.
Example:
Midori.runTests(YourLibrary, {
timeoutWarningDelay = 10,
})
Default config values:
{
showTimeoutWarning = true,
timeoutWarningDelay = 15,
concurrent = false,
}
caution
The concurrent option should only be used if your tests do not affect each other at all. If used, tests should not access
variables other tests access. The code that is being tested should also not contain any global state.