Busted Test Framework

Overview

Qualified supports writing tests for Lua using Busted.

Basic Example

Solution

local t = {}
function t.add(a, b)
  return a + b
end
return t

Tests

local t = require 'solution'
describe("add", function()
  it("should add numbers", function()
    assert.are.same(2, t.add(1, 1))
  end)
end)

Learn More

You can learn more on the Busted website.