You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow asserting expected test coverage of source files with something like:
require("mineunit")
assert.coverage("init", 100, "Some branches were not called during test execution")
sourcefile("init")
describe("mytestset",function()
it("wont crash doing everything", function()
mymod.doeverything()
end)
end)
There assertion itself should go to queue and tested against coverage after execution of said spec is completed.
Or possibly after all tests in selected set completed.
Why?
Few use cases, first of course you might want to ensure that at least n% of your added code is actually tested.
Second for testing things like chat commands, it is not simple to check chat output and that does not belong to API testing but with 100% coverage test included you can still be sure that your tests will actually call through all branches while using testing chat commands.
Similar for everything where one would otherwise have to check text output or action that does not have definite constant outcome, instead simply check that all branches were called to ensure that your handlers actually work as expected.
This of course is not complete testing but still able to catch most simple errors that cannot be tested well by other means.
The text was updated successfully, but these errors were encountered:
Allow asserting expected test coverage of source files with something like:
There assertion itself should go to queue and tested against coverage after execution of said spec is completed.
Or possibly after all tests in selected set completed.
Why?
Few use cases, first of course you might want to ensure that at least n% of your added code is actually tested.
Second for testing things like chat commands, it is not simple to check chat output and that does not belong to API testing but with 100% coverage test included you can still be sure that your tests will actually call through all branches while using testing chat commands.
Similar for everything where one would otherwise have to check text output or action that does not have definite constant outcome, instead simply check that all branches were called to ensure that your handlers actually work as expected.
This of course is not complete testing but still able to catch most simple errors that cannot be tested well by other means.
The text was updated successfully, but these errors were encountered: