This commit is contained in:
Jaco
2022-03-23 07:19:33 +02:00
committed by GitHub
parent 31e7de31f3
commit e573c26df3
6 changed files with 71 additions and 65 deletions
+3 -1
View File
@@ -23,7 +23,9 @@ describe('Text', (): void => {
testDecode('Raw', new Raw(registry, Uint8Array.from([102, 111, 111])), 'foo', 'toHuman'); // no length
testDecode('Bytes', new Bytes(registry, Uint8Array.from([12, 102, 111, 111])), 'foo'); // length-aware encoding
testDecode('Bytes', new Bytes(registry, Uint8Array.from([12, 102, 111, 111])), 'foo', 'toHuman'); // length-aware encoding
testDecode('object with `toString()`', { toString (): string { return 'foo'; } }, 'foo');
testDecode('object with `toString()`', { toString (): string {
return 'foo';
} }, 'foo');
testDecode('hex input value', new Text(registry, '0x12345678'), '0x12345678', 'toHex');
testDecode('null', null, '');
});