mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 13:15:49 +00:00
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:
@@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user