Skip to content

Conversation

@gabrielbmoro
Copy link
Contributor

@gabrielbmoro gabrielbmoro commented Sep 9, 2025

Description

  • This PR fix the unit test issue + solve the pipeline issue adding the generate code step required by the mock library.
  • Update gitignore file, and remove generated code from our versioning
  • Remove unnecessary platform source sets

Closes #2

@gabrielbmoro gabrielbmoro marked this pull request as ready for review September 9, 2025 22:45
uses: ./.github/actions/setup-flutter


- name: Generate code
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new step before run the tests considering Mock framework generates code

final bookDetails = await _getBookDetails(id: bookId!);
return BookDetailsUI.fromDomain(bookDetails);
} else {
emit(state.copyWith(errorMessage: "Book ID is null"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this considering we are already emitting the state in the proper method caller (dart analyze pointed an issue here, we cannot emit without being in a scope of event (on ...)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well considered 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve unit tests issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove generated test (not used)

);
} catch (e) {
print('Error during pagination: $e');
debugPrint('Error during pagination: $e');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analyze requires us to use debugPrint instead

@gabrielbmoro gabrielbmoro merged commit 3e4d604 into main Sep 10, 2025
1 check passed
@gabrielbmoro gabrielbmoro deleted the feature/fix-unit-tests branch September 10, 2025 13:43
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.

Solve unit tests issue

3 participants