Conversation
- added `writeBigInt64BE`, `writeBigInt64LE`, `writeBigUInt64BE`, and `writeBigUInt64LE` along with their aliases
|
@dop251 wanted your thoughts on something. These tests are getting larger and larger, so I had the inclination to define some assertion utility functions in JavaScript that I could use instead of repeating similar JS. An example would be to replace something like: With My concern was that it makes it less obvious exactly what you are testing. |
|
other option would be to define finer grained assertion functions, e.g. |
|
Makes sense to me. In general I think most of the assertions need to be done in js, rather than in Go, there is even |
|
Ah, I didn't even notice that |
90090d2 to
958509e
Compare
- added the `assertions.js` file for the buffer tests - refactored the `assert.throws*` method to reduce the duplicate code
958509e to
243134a
Compare
|
@dop251 this is good to go. I'll probably do some more test refactoring on the next PR |
* Added writeBig* methods - added `writeBigInt64BE`, `writeBigInt64LE`, `writeBigUInt64BE`, and `writeBigUInt64LE` along with their aliases * Simplified tests - added the `assertions.js` file for the buffer tests - refactored the `assert.throws*` method to reduce the duplicate code
writeBigInt64BE,writeBigInt64LE,writeBigUInt64BE, andwriteBigUInt64LEalong with their aliases