2019-07-16 13:02:50 -07:00
|
|
|
-- Extends the upstream TAP handler, to display the log with suiteEnd.
|
|
|
|
|
2024-04-08 02:03:20 -07:00
|
|
|
local t_global = require('test.testutil')
|
2019-07-16 13:02:50 -07:00
|
|
|
|
|
|
|
return function(options)
|
2019-08-29 13:11:51 -07:00
|
|
|
local busted = require 'busted'
|
2019-07-16 13:02:50 -07:00
|
|
|
local handler = require 'busted.outputHandlers.TAP'(options)
|
|
|
|
|
2019-08-29 13:11:51 -07:00
|
|
|
local suiteEnd = function()
|
2024-04-08 02:03:20 -07:00
|
|
|
io.write(t_global.read_nvim_log(nil, true))
|
2019-08-29 13:11:51 -07:00
|
|
|
return nil, true
|
2019-07-16 13:02:50 -07:00
|
|
|
end
|
2019-08-29 13:11:51 -07:00
|
|
|
busted.subscribe({ 'suite', 'end' }, suiteEnd)
|
2019-07-16 13:02:50 -07:00
|
|
|
|
|
|
|
return handler
|
|
|
|
end
|