Skip to content

Commit 5266d7b

Browse files
committed
Add test
1 parent e0ad82d commit 5266d7b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

napi/__test__/index.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,18 @@ test("mint and spend nft", (t) => {
281281
)
282282
);
283283
});
284+
285+
test("create and parse condition", (t) => {
286+
const clvm = new ClvmAllocator();
287+
288+
const puzzleHash = fromHex("ff".repeat(32));
289+
290+
const condition = clvm.createCoin(puzzleHash, 1n, [puzzleHash]);
291+
const parsed = clvm.parseCreateCoin(condition);
292+
293+
t.deepEqual(parsed, {
294+
puzzleHash,
295+
amount: 1n,
296+
memos: [puzzleHash],
297+
});
298+
});

0 commit comments

Comments
 (0)