xrforge-v2/src/test/main.lua

28 lines
1,014 B
Lua
Raw Normal View History

2026-07-23 21:34:09 +02:00
local lust = require 'test/lust'
local describe, it, expect = lust.describe, lust.it, lust.expect
-- usage: https://github.com/bjornbytes/lust
lust.queueServerRequest = function(method, path, params, host, headers, body, scheme, port)
GetMethod = function() return method end
GetPath = function() return path end
GetParams = function() return params or {} end -- note: { {"key","value"} } format
GetHost = function() return host or 'localhost' end
GetHeaders = function() return headers or {} end
GetScheme = function() return scheme or 'https' end
GetBody = function() return body or '' end
GetPort = function() return port or 80 end
end
require('test/plugin_global')(lust)
2026-08-12 15:00:42 +02:00
require('test/plugin_git')(lust)
require('test/plugin_diskscan')(lust)
2026-08-06 16:43:17 +02:00
require('test/plugin_xrfragment')(lust)
2026-07-23 21:34:09 +02:00
if lust.errors == 0 then
print("✅ all tests passed")
else
print("[!] some tests failed")
print("errors: " .. lust.errors .. " :(")
end
os.exit(lust.errors)