neovim/test/busted/outputHandlers/TAP.lua
Daniel Hahler 00d46f6328
Fix test/busted/outputHandlers/TAP.lua (#10881)
Extending the original TAP handler was not working as expected.
This adds a new function for displaying the log.

Ref: https://github.com/neovim/neovim/pull/10876
2019-08-29 22:11:51 +02:00

17 lines
416 B
Lua

-- Extends the upstream TAP handler, to display the log with suiteEnd.
local global_helpers = require('test.helpers')
return function(options)
local busted = require 'busted'
local handler = require 'busted.outputHandlers.TAP'(options)
local suiteEnd = function()
io.write(global_helpers.read_nvim_log())
return nil, true
end
busted.subscribe({ 'suite', 'end' }, suiteEnd)
return handler
end