-
-
Notifications
You must be signed in to change notification settings - Fork 915
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 few unit tests for MspHelper class #3425
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
AUTOMERGE: (FAIL)
|
flashed one FC; pseudo-configured without any known issue. (unsoldered) |
@Benky is this is false positive? Noticed while working on another PR and see it's in the above test also.
|
Hey @haslinghuis - first of all, sorry for late response. It's actually an expected thing - it's generated by https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp/MSPHelper.js#L1645 which gets triggered during this test :
|
Description
This PR adds a few unit tests for
MspHelper
class (more to come). Most of the data in unit tests are randomly generated, so we can test for various length / number of cases.I've also added a few commits that simplify
encode_message_v1
and handling ofMSP_BOARD_INFO
(for better readability and maintainability).Notes
I can separate commits with simplification of the methods to separate PR is required.