Open
Description
It would be nice to have tap
helper or fixture.
That can help us to migrate from taptest
to luatest
.
example:
function g.test_foobar()
tap = g.tap(2, 'Foobar test') -- plan: 2, name: 'Foobar test'
tap:ok(bar, 'bar is true')
tap:eq(baz, baz, 'bar and baz are the same')
end
Or:
function g.test_foobar()
g.tap.test('Foobar test', function(tap)
tap:plan(2)
tap:ok(bar, 'bar is true')
tap:is(bar, baz, 'bar and baz are the same')
end)
end
Or even:
function g.taptest_foobar(tap)
tap:plan(2)
tap:ok(bar, 'bar is true')
tap:is(bar, baz, 'bar and baz are the same')
end
- plan is optional
- it doesn't need to call
tap:check()
(the call have to be touched after test callback) - it would be nice to have a way to watch full log with tap log inside tests (luatest option or something else)