2026-07-24 17:06:31 +02:00
|
|
|
|
return function(lust)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local describe, it, expect = lust.describe, lust.it, lust.expect
|
|
|
|
|
|
|
|
|
|
|
|
describe('src/plugin/diskscan.lua', function()
|
|
|
|
|
|
|
|
|
|
|
|
lust.before(function() os.execute('test/env/demofiles.sh create') end)
|
|
|
|
|
|
lust.after(function() os.execute('test/env/demofiles.sh cleanup') 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)
|
|
|
|
|
|
|
2026-08-06 16:43:17 +02:00
|
|
|
|
describe('src/plugin/diskscan.lua (e2e)', function()
|
|
|
|
|
|
|
|
|
|
|
|
describe('ℹ️ scan_experience', function() -- Can be nested
|
|
|
|
|
|
|
|
|
|
|
|
local dirs = 0
|
|
|
|
|
|
|
|
|
|
|
|
app.on('scan_experience', function(exp)
|
|
|
|
|
|
if exp.dir then dirs = dirs +1 end
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
it('on init', function()
|
|
|
|
|
|
app.init()
|
|
|
|
|
|
expect(dirs > 0).to.be.truthy()
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
2026-07-24 17:06:31 +02:00
|
|
|
|
end
|