2019-07-16 13:02:50 -07:00
|
|
|
-- Extends the upstream TAP handler, to display the log with suiteEnd.
|
|
|
|
|
|
|
|
local global_helpers = require('test.helpers')
|
|
|
|
|
|
|
|
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()
|
2020-02-16 20:02:09 -07:00
|
|
|
io.write(global_helpers.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
|