lunarmodules / busted

Elegant Lua unit testing.
https://lunarmodules.github.io/busted/
MIT License
1.39k stars 184 forks source link

describe message doesn't get printed #691

Closed kollol-chowdhury-incontact closed 2 years ago

kollol-chowdhury-incontact commented 2 years ago

When I run the below code,it doesn't print any message(some assertions/tests positive assertions/tests negative assertions) ,if the test is successful. Incase of failure, it prints the message

describe("some assertions", function()
  it("tests positive assertions", function()
    assert.is_true(true)  -- Lua keyword chained with _
    assert.True(true)     -- Lua keyword using a capital
    assert.are.equal(1, 1)
    assert.has.errors(function() error("this should fail") end)
  end)

  it("tests negative assertions", function()
    assert.is_not_true(false)
    assert.are_not.equals(1, "1")
    assert.has_no.errors(function() end)
  end)
end)
Tieske commented 2 years ago

It depends on the outputter used. The --output=xxx option (or -o).

I typically run my tests as busted -v -o gtest

kollol-chowdhury-incontact commented 2 years ago

Thanks a lot..it helped