xrforge-v2/src/test/main.lua

29 lines
682 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
describe('my project', function()
lust.before(function()
-- This gets run before every test.
end)
describe(' app vars', function() -- Can be nested
it('bindir', function()
print(app.bindir)
expect(app.bindir).to.fail('xrforge.com') -- Pass
end)
it('feature2', function()
expect(nil).to.exist() -- Fail
end)
end)
end)
if lust.errors == 0 then
print("✅ all tests passed")
else
print("[!] some tests failed")
print("errors: " .. lust.errors .. " :(")
end
os.exit(lust.errors)