-
Notifications
You must be signed in to change notification settings - Fork 83
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
Refactor/remove mocks #1005
Refactor/remove mocks #1005
Conversation
ed9e3eb
to
fd55c26
Compare
Codecov Report
@@ Coverage Diff @@
## main #1005 +/- ##
==========================================
+ Coverage 30.39% 30.50% +0.11%
==========================================
Files 422 420 -2
Lines 26281 26005 -276
Branches 5100 5022 -78
==========================================
- Hits 7987 7932 -55
+ Misses 16070 15890 -180
+ Partials 2224 2183 -41
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4db72b1
to
3a2d694
Compare
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.
LGTM, just the comments about commented out CI + commented out code (nvm, i missed the description, my bad)
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.
Seems reasonable to me! although libvcx/node is not really my domain, so approval from Patrik or Miroslav as well would be ideal
I stopped commenting eventually, but feel free to delete the commented tests Very happy about this PR |
Alright. Will actually do that, since all the comments are kinda bloaty. |
3a2d694
to
834d877
Compare
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
834d877
to
1fddbde
Compare
There are plenty of occurrences where some occult mocking mechanism is employed by holding some global settings
HashMap
and setting/getting values from it.This PR explores and aims to deal with this in multiple ways:
adjust the mocks to only be employed when testing through#[cfg(test)]
This sets the ground for better decoupling the test code from production code.
Update
Unfortunately conditionally compiling mocks instead of real components based on the
test
profile does not work and neither does using real components in all tests. The reason is because with the runtime global flags there were tests that were using the mocks while others were not.The problems were arising in the
libvcx_core
tests and the node JS wrapper tests. The tests were commented out to allow the CI to pass. In my opinion, the tests were awkward in the first place because:aries_vcx
(with real components)aries_vcx
does not