Closed assafmo closed 8 months ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 86.42% (-0.08% π») |
140/162 |
π’ | Branches | 80% | 36/45 |
π’ | Functions | 93.33% | 28/30 |
π’ | Lines | 88.37% | 114/129 |
18 tests passing in 4 suites.
Report generated by π§ͺjest coverage report action from 58992f4b6145bd1341eee08c9391f2434d105db5
This fixes
bytesToNumber()
to always return the result as an unsigned integer.Example:
byteArray
holds the value2^32 - 3
, which is11111111111111111111111111111101
in binary. The old implementation uses thenumber
type, which is a signed integer, to calculate intermediate values. And because the most significant bit (MSB) is turned on, it interprets this as a negative number and returns-3
.