xrforge-v2/src/test/plugin_diskscan.lua

43 lines
952 B
Lua
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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)
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)
end