Compact support for decoding and decoding (#256)

This commit is contained in:
Jaco Greeff
2018-11-21 15:41:19 +01:00
committed by GitHub
parent e23cadc193
commit 477be907d8
15 changed files with 316 additions and 1 deletions
+8
View File
@@ -33,6 +33,14 @@ describe('u8aToU8a', () => {
);
});
it('creates from Array', () => {
expect(
u8aToU8a([128, 0, 10, 11, 12])
).toEqual(
new Uint8Array([128, 0, 10, 11, 12])
);
});
it('returns a Uint8Array as-is (u8a input)', () => {
expect(
u8aToU8a(new Uint8Array([128, 0, 10]))