You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered some difficulties in unit tests.
I want to place the textState in a viewModel/stateHolder or whatever it's called and be able to test it.
The first problem is that the RichTextState is not immutable as mentioned in below issue:
So, I cannot enforce the users of my state holder to change the textState only through the methods of my state holder.
The next problem is that I have the following code which is working as intended in the app but my test gives false positive (the textState.textAlign in test is Left):
Hey! Thanks for the great library.
I have encountered some difficulties in unit tests.
I want to place the textState in a viewModel/stateHolder or whatever it's called and be able to test it.
The first problem is that the RichTextState is not immutable as mentioned in below issue:
So, I cannot enforce the users of my state holder to change the textState only through the methods of my state holder.
The next problem is that I have the following code which is working as intended in the app but my test gives false positive (the
textState.textAlign
in test isLeft
):Next, being notified/reacting to textState changes is not easy which makes tests need the workaround mentioned in below issues:
Side problem:
Can you please provide a way to add link to the current selection (like how bold and italic work)?
The text was updated successfully, but these errors were encountered: