Skip to content

feat: Includes the ability to create a custom Cubit by extending Cubit class#92

Open
MattiaPispisa wants to merge 1 commit intofelangel:masterfrom
MattiaPispisa:feature/cubit
Open

feat: Includes the ability to create a custom Cubit by extending Cubit class#92
MattiaPispisa wants to merge 1 commit intofelangel:masterfrom
MattiaPispisa:feature/cubit

Conversation

@MattiaPispisa
Copy link
Copy Markdown

@MattiaPispisa MattiaPispisa commented Oct 25, 2022

Status

READY

Breaking Changes

NO

Description

APIs to create cubit by extending the cubit class.
Cubit and Bloc extends a common class: BlocBase

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

super()
this.stateSubject = new Subject()
export abstract class Bloc<Event, State> extends BlocBase<State> {
/* istanbul ignore next */
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
/* istanbul ignore next */

Why are we ignoring this line?

Copy link
Copy Markdown
Author

@MattiaPispisa MattiaPispisa Oct 25, 2022

Choose a reason for hiding this comment

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

Just a problem with jest.
Babel converts the super to var _this = _super.call (this) || this and this will result in never testing the second condition (the test coverage will not be 100%).
I think updating the dependencies solves the problem but I preferred to not change the dependencies.

@MattiaPispisa MattiaPispisa changed the title Includes the ability to create a custom Cubit by extending Cubit class feat: Includes the ability to create a custom Cubit by extending Cubit class Oct 26, 2022
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.

2 participants