-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add a Setup<X>() method to MockJSRuntime #234
Conversation
…l invocations with type X
Codecov Report
@@ Coverage Diff @@
## dev #234 +/- ##
==========================================
- Coverage 81.03% 80.95% -0.08%
==========================================
Files 112 112
Lines 3395 3419 +24
Branches 430 432 +2
==========================================
+ Hits 2751 2768 +17
- Misses 515 520 +5
- Partials 129 131 +2
Continue to review full report at Codecov.
|
Hi @nemesv, Thanks for this, it's much appreciated. I'll take a look at this ASAP one of the coming days and provide feedback. |
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.
Hi @nemesv
Great work. It seems you covered all the test cases!
I added a few comments in the code below. Besides those, I wonder if we should also add a SetupVoid()
variant?
Let me know what you think.
src/bunit.web/TestDoubles/JSInterop/MockJSRuntimeInvokeHandler.cs
Outdated
Show resolved
Hide resolved
src/bunit.web/TestDoubles/JSInterop/MockJSRuntimeInvokeHandler.cs
Outdated
Show resolved
Hide resolved
I am not sure about the |
|
Hey @nemesv Sorry, I completely missed that you pushed some changes. I will review ASAP tonight. |
…ll void invocations
No worries :) In the meanwhile I've finished and pushed the implementation of the suggested |
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.
Looks great. I pushed a tweak the JSRuntimePlannedInvocation to remove an unneeded class in the hierarchy... thought it easier to tweak myself then try to explain 🙂
Anyway, last thing on the checklist is adding a small extra example/section to the documentation. Are you up for that?
Sure, I can update the documentation tomorrow. Have you meant this page https://github.com/egil/bUnit/blob/main/docs/site/docs/test-doubles/mocking-ijsruntime.md? |
Awesome. Correct, that's the page. Do check out the readme in the docs folder for instructions for writing docs. |
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.
Thank for the docs update. Looks good to me.
Thank you very much for the effort @nemesv. Let me know if you want to help out with others issues. I can always use skilled coders on bUnit! |
Implements #206
Pull request description
PR meta checklist
DEV
branch.Content checklist