Closed amishshah closed 3 years ago
Merging #82 (3369f25) into main (f140bd4) will increase coverage by
3.50%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #82 +/- ##
==========================================
+ Coverage 44.01% 47.52% +3.50%
==========================================
Files 15 15
Lines 602 606 +4
Branches 133 134 +1
==========================================
+ Hits 265 288 +23
+ Misses 335 316 -19
Partials 2 2
Impacted Files | Coverage Δ | |
---|---|---|
src/networking/VoiceUDPSocket.ts | 95.83% <100.00%> (+95.83%) |
:arrow_up: |
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 f140bd4...3369f25. Read the comment docs.
Addressed code review @kyranet. As for the malformed packet test, I realised this situation could never actually occur, so I removed the check.
Please describe the changes this PR makes and why it should be merged:
Adds unit tests to VoiceUDPSocket, and also fixes an issue raised in testing. Previously, if an unexpected message was received on the socket during IP discovery, then an unhandled error would be thrown. This has been fixed, the caller of the parsing function now handles errors by discarding bad packets. The parsing function also validates the IP address.
Status and versioning classification: