-
Notifications
You must be signed in to change notification settings - Fork 0
Some Unit tests #11
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
Some Unit tests #11
Conversation
Unit tests for search books
| @@ -0,0 +1,10 @@ | |||
| import 'package:mibook/layers/domain/models/book_list_domain.dart'; | |||
|
|
|||
| final fakeBookDomain = BookDomain( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For one moment I was wondering what the hell is a FacebookDomain....
| import 'get_book_details_test.mocks.dart'; | ||
|
|
||
| void main() { | ||
| late MockISearchRepository mockSearchRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we avoid late variables in the tests? That could provoke crashes in our CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t understand why this would cause any issues in our CI/CD pipeline, since we’re initializing them properly in the setUp method.
Anyways, I will merge the PR. If you think it is important to address this in the future, let's create an issue in our repo.
🤗
| import 'search_books_test.mocks.dart'; | ||
|
|
||
| void main() { | ||
| late MockISearchRepository mockSearchRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
di.config.dartto gitignore file;