test with v1 and v2 encoding

This commit is contained in:
Kevin Jahns
2020-12-16 23:26:38 +01:00
parent ba83398374
commit 47221c26c4
3 changed files with 47 additions and 27 deletions

View File

@@ -173,7 +173,7 @@ const sliceStruct = (left, diff) => {
* @return {Uint8Array}
*/
export const mergeUpdatesV2 = (updates, YDecoder = UpdateDecoderV2, YEncoder = UpdateEncoderV2) => {
const updateDecoders = updates.map(update => new UpdateDecoderV1(decoding.createDecoder(update)))
const updateDecoders = updates.map(update => new YDecoder(decoding.createDecoder(update)))
let lazyStructDecoders = updateDecoders.map(decoder => new LazyStructReader(decoder))
/**