aboutsummaryrefslogtreecommitdiff
path: root/test/busted/outputHandlers/TAP.lua
blob: 2439547050300042beab1127385ef0d39ab7ea2d (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 t_global = require('test.testutil')

return function(options)
  local busted = require 'busted'
  local handler = require 'busted.outputHandlers.TAP'(options)

  local suiteEnd = function()
    io.write(t_global.read_nvim_log(nil, true))
    return nil, true
  end
  busted.subscribe({ 'suite', 'end' }, suiteEnd)

  return handler
end