We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16d62c6 commit 88bf9b7Copy full SHA for 88bf9b7
test/script.spec.ts
@@ -52,12 +52,10 @@ describe('script', () => {
52
});
53
54
it("decodes a series of numbers from '82 to 96' correctly", () => {
55
- const asm = Array.from({ length: 15 }, (_, i) =>
56
- (i + 130).toString(16).padStart(2, '0'),
57
- ).join(' ');
+ const asm = Array.from({ length: 15 }, (_, i) => i + 82).join(' ');
58
const expected = Array.from({ length: 15 }, (_, i) => [
59
1,
60
- i + 130,
+ parseInt(String(i + 82), 16),
61
]).flat();
62
const result = bscript.fromASM(asm);
63
assert.deepStrictEqual(result, Uint8Array.from(expected));
0 commit comments