mirror of
https://github.com/0x5eal/semver-luau.git
synced 2024-12-12 15:00:36 +00:00
24 lines
644 B
Text
24 lines
644 B
Text
--> Run tests using frktest runner
|
|
|
|
local fs = require("@lune/fs")
|
|
local process = require("@lune/process")
|
|
|
|
local frktest = require("@pkg/frktest")
|
|
|
|
-- HACK: Cast require to allow for dynamic paths in strict mode
|
|
-- A more proper solution would be to use luau.load instead, but
|
|
-- frktest requires its global state to be modified by test suites
|
|
local require = require :: (path: string) -> () -> ()
|
|
|
|
if process.args[1] ~= nil then
|
|
require("../tests/" .. process.args[1])()
|
|
else
|
|
for _, test in fs.readDir("tests") do
|
|
require("../tests/" .. test)()
|
|
end
|
|
end
|
|
|
|
frktest.reporters.lune.init()
|
|
if not frktest.core.run() then
|
|
process.exit(1)
|
|
end
|