Some additional small tests (#429)

* Some additional small tests

* Missing MemoryDb from previous commit
This commit is contained in:
Jaco Greeff
2019-07-09 11:07:55 +02:00
committed by GitHub
parent 0ab9dc9164
commit 23e3ff0ac3
4 changed files with 76 additions and 2 deletions
+8
View File
@@ -39,6 +39,14 @@ describe('encode', () => {
);
});
it('encodes basic u32 values (< 2^30)', () => {
expect(
compactToU8a(0x1fff)
).toEqual(
new Uint8Array([253, 127])
);
});
it('encodes basic u32 values (short)', () => {
expect(
compactToU8a(0xffff)