Fix node 12 compatibility (#33)

The unit tests were comparing things of different types, which failed under the stricter checks.
This commit is contained in:
William Swanson
2019-08-29 17:54:42 -07:00
parent 67d00491eb
commit 0a55ba64fa
4 changed files with 8 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ function bytesListTest() {
it('can join all arrays into one via toBytes', function() {
const joined = list.toBytes();
assert(joined.length, 5);
assert.deepEqual(joined, [0, 2, 3, 4, 5]);
assert.deepEqual(joined, Uint8Array.from([0, 2, 3, 4, 5]));
});
}
@@ -95,7 +95,7 @@ function UIntTest() {
return;
}
serializer.writeType(type, n);
assert.deepEqual(bl.toBytes(), expected);
assert.deepEqual(bl.toBytes(), Uint8Array.from(expected));
});
}