Welcome to Testing Fundamentals of Flutter by Jorge Coca! Lesson 23 teaches you how to collect code coverage from your tests. Calculator App: github.com/jor...
I also have the same coverage results, how to achieve 100% coverage for the assert statement as well as when I use equatable the override function shows similar red highlights how to gain 100% coverage in such scenario? And btw thanks for this great series, looking to learn a lot from you!
One simple approach is to run this kind of tests: expect( () => ClassWithAsserts( parameterWithAssertion: null, ), throwsAssertionError, ); Take note, that the constructor will be called only when except is called
CAN SOMEBODY JUST TELL ME HOW TO INSTALL AND USE LCOV FOR WINDOWS
I also have the same coverage results, how to achieve 100% coverage for the assert statement as well as when I use equatable the override function shows similar red highlights how to gain 100% coverage in such scenario?
And btw thanks for this great series, looking to learn a lot from you!
One simple approach is to run this kind of tests:
expect(
() => ClassWithAsserts(
parameterWithAssertion: null,
),
throwsAssertionError,
);
Take note, that the constructor will be called only when except is called