Skip to content

0.4.0

Choose a tag to compare

@FourierTransformer FourierTransformer released this 07 Sep 02:24
· 3 commits to main since this release
e2c3de3

This release includes a major breaking change. tested is now class based, which proved crucial while working on a single-file distribution with the intent to embed in other applications. This now requires an initializer that returns a tested object, which has the test and lifecycle methods off it, whereas all the asserts are still from the main tested module.

Before:

local tested = require("tested")

tested.test("just works!", function()
	tested.assert({
		given="nothing",
		should="just work!",
		expected=true,
		actual=true
	})
end)

return tested

After:

local tested = require("tested")
local t = tested.new()

t:test("just works!", function()
	tested.assert({
		given="nothing",
		should="just work!",
		expected=true,
		actual=true
	})
end)

return t

All of the docs have been updated as well as the all the tested's own tests. We are still pre v1, and API changes can and do happen. I would've loved to avoid such a major one, but future plans required the change and I think tested will be better off for it.

What's Changed

Full Changelog: 0.3.0...0.4.0