Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves coverage stats #174

Closed
wants to merge 2 commits into from

Conversation

hjJunior
Copy link

@hjJunior hjJunior commented Jan 15, 2020

Task

  • Adds tests for SwiperPluginConfig
  • Adds tests for SwiperPluginView
  • Adds tests for CustomLayoutOption

I also added @required which helps with code completion on IDEA

Before

Overall coverage rate:
  lines......: 59.7% (397 of 665 lines)
  functions..: no data found

After

Overall coverage rate:
  lines......: 62.3% (420 of 674 lines)
  functions..: no data found

Why I added two new dependencies?

Mockito

Mockito is the most popular package on Dart which allows to mock classes dependencies and also enables some matches on tests such if the function has been called

Equatable

Since we can't compare direct two objects without overriding equals method on each class, this is a fast way to "override" it, this is required to enable flutter test to compare on expect tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant