Skip to content
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 unit tests for webrtc.js #52

Merged
merged 3 commits into from
Sep 19, 2019

Conversation

vvmnnnkv
Copy link
Member

This for #48

Some corner cases need to be covered, however, I've got concern that mocking browser's RTC might be wrong direction, as this doesn't actually test that RTC works. Tests are not being executed in browser(s).
E.g. I tried to run "with-grid" example to establish connection between Chrome and FF, and this didn't work. Maybe this should be covered by some separate integration test suite, though, not sure.

@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #52 into grid-syft will increase coverage by 69.71%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           grid-syft    #52       +/-   ##
============================================
+ Coverage      30.28%   100%   +69.71%     
============================================
  Files              2      3        +1     
  Lines            142    165       +23     
  Branches          12     12               
============================================
+ Hits              43    165      +122     
+ Misses            89      0       -89     
+ Partials          10      0       -10
Impacted Files Coverage Δ
test/_webrtc-mocks.js 100% <100%> (ø)
src/webrtc.js 100% <0%> (+92.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d319b84...cb7116f. Read the comment docs.

@cereallarceny cereallarceny marked this pull request as ready for review September 17, 2019 09:32
Copy link
Member

@cereallarceny cereallarceny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good, a few comments. In the future, should we look at replacing these tests with Puppeteer? https://jestjs.io/docs/en/puppeteer

test/_webrtc-mocks.js Outdated Show resolved Hide resolved
test/webrtc.test.js Outdated Show resolved Hide resolved
test/webrtc.test.js Show resolved Hide resolved
@cereallarceny cereallarceny merged commit 60c43bf into OpenMined:grid-syft Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants