-
Notifications
You must be signed in to change notification settings - Fork 8
Add mockbind #510
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 mockbind #510
Conversation
|
Visit the preview URL for this PR (updated for commit ef8e5ed): https://ccv-honeycomb--pr510-add-mockbind-4eu58dfx.web.app (expires Fri, 19 Jul 2024 16:58:01 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 4ace1dcea913a952d2a1af84b94a4421bf36e610 |
public/electron/main.js
Outdated
| if (CONTINUE_ANYWAY == false) { | ||
| CONTINUE_ANYWAY = true; | ||
| } |
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 believe this can be simplified without the if statement
| if (CONTINUE_ANYWAY == false) { | |
| CONTINUE_ANYWAY = true; | |
| } | |
| CONTINUE_ANYWAY = true; |
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.
Is this mainly a statement to use the CONTINUE_ANYWAY variable?
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 agree this is very redundant -- yes, it is primarily to use this variable to pass the eslint tests. I was wondering since it gives this unused variable warning, would it be okay to just delete this variable overall?
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.
We can safely remove the variable! That variable was only there to skip sending data to a port that didn't exist, but now we have a mock port to send it to
RobertGemmaJr
left a comment
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.
This looks fantastic! Adding the mock port has been a much needed addition for quite some time now. Thank you for tackling it!
You can safely remove the CONTINUE_ANYWAY variable, then this is ready to go
This variable should be removed! |
RobertGemmaJr
left a comment
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.
Wonderful!
log.infoto not include portCONTINUE_ANYWAYthrows warning that it's never used after deleting check on if continue anyway is true, we return fromhandleEventSend(); I'm not sure if we can remove this variable entirely? Otherwise to resolve this, I added a check for that if it'sCONTINUE_ANYWAYis false, we then set it to true