mirror of https://github.com/koreader/koreader
verbose unit test log so that we have a clue when there is segfault
parent
1e4ac8c3b5
commit
429eeed372
@ -0,0 +1,22 @@
|
||||
-- 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
|
Loading…
Reference in New Issue