aboutsummaryrefslogtreecommitdiff
path: root/test/busted/outputHandlers/TAP.lua
blob: 5de48c0ad3d8bda24d84875ae62c787c66a1d9c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- 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(nil, true))
    return nil, true
  end
  busted.subscribe({ 'suite', 'end' }, suiteEnd)

  return handler
end