Add deleted method in tests util

This commit is contained in:
dapplion 2020-12-03 00:31:52 +00:00
parent 84488456de
commit 0b10c2cb4e
1 changed files with 8 additions and 0 deletions

View File

@ -13,3 +13,11 @@ export function range(n: number): number[] {
for (let i = 0; i < n; i++) nums.push(i); for (let i = 0; i < n; i++) nums.push(i);
return nums; return nums;
} }
/**
* ONLY for NodeJS tests, for any other use src/helpers/hex hexToBytes()
* Serves as a "ground-truth" reference
*/
export function hexToBytesNode(hex: string): Buffer {
return Buffer.from(hex.replace("0x", ""), "hex");
}