You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/spec/unit/verbose_print.lua

23 lines
643 B
Lua

-- from Mashape/kong/spec/busted-print.lua
local ansicolors = require 'ansicolors'
return function(options)
local handler = require 'busted.outputHandlers.utfTerminal'(options)
handler.fileStart = function(file)
io.write('\n' .. ansicolors('%{cyan}' .. file.name) .. ':')
end
handler.testStart = function(element, parent, status, debug)
io.write('\n ' .. handler.getFullName(element) .. ' ... ')
io.flush()
end
local busted = require 'busted'
busted.subscribe({ 'file', 'start' }, handler.fileStart)
busted.subscribe({ 'test', 'start' }, handler.testStart)
return handler
end