Skip to content

add fixed array serialization/deserialization#27

Merged
mehtaphysical merged 2 commits intomasterfrom
feat/add-fixed-array
Jul 22, 2021
Merged

add fixed array serialization/deserialization#27
mehtaphysical merged 2 commits intomasterfrom
feat/add-fixed-array

Conversation

@mehtaphysical
Copy link
Contributor

Fixes #26.

This adds serialization for fixed arrays.

@mehtaphysical mehtaphysical requested review from ailisp and volovyks July 21, 2021 19:40
@mehtaphysical
Copy link
Contributor Author

didn't notice there is already #3

expect(buf).toEqual(Buffer.from([5, 0, 0, 0, 104, 101, 108, 108, 111, 5, 0, 0, 0, 119, 111, 114, 108, 100]));
expect(deserializedValue.a).toEqual(['hello', 'world']);
});

Copy link
Member

Choose a reason for hiding this comment

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

This test looks nice. I think we also need a test to test error to serilaize/deserialize when given array has a different array in schema.

Copy link
Member

@ailisp ailisp left a comment

Choose a reason for hiding this comment

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

Looks good. Seems CI is broken by fossa. Does your local yarn test work?

@mehtaphysical
Copy link
Contributor Author

added tests for error cases

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.

Support fixed size array

3 participants