There is no dependency on a testing library yet, so I added a
basic interface for mocking and asserting test values to get
something to start with. I'll probably replace it with busted
or telescope later on to get nicer testing output.
files['daemon/lua'].ignore = {'111', '121', '122'}
-- Tests and scripts can use global variables
files['scripts'].ignore = {'111', '112', '113'}
-files['tests'].ignore = {'111', '112', '113'}
\ No newline at end of file
+files['tests'].ignore = {'111', '112', '113'}
+files['tests/config/test_utils.lua'].ignore = {'121'}
\ No newline at end of file
end
return false
end
+
+-- Emulate busted testing interface
+local assert_builtin = assert
+assert = setmetatable({}, {
+ __call = function (_, ...)
+ return assert_builtin(...)
+ end,
+ __index = {
+ truthy = function (expr)
+ assert_builtin(expr)
+ end,
+ falsy = function (expr)
+ assert_builtin(not expr)
+ end,
+ same = function (a, b)
+ if a ~= b then
+ assert_builtin(false, string.format('expected: %s got: %s', a, b))
+ end
+ end,
+ }
+})
\ No newline at end of file