Skip to content

Commit 56b664f

Browse files
committed
fix: billboard test
1 parent ec87479 commit 56b664f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

examples/billboard/tests/billboard_test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Clarinet, Tx, Chain, Account, types } from 'https://deno.land/x/clarinet@v0.6.0/index.ts';
1+
import { Clarinet, Tx, Chain, Account, types } from 'https://deno.land/x/clarinet@v0.12.0/index.ts';
22
import { assertEquals } from 'https://deno.land/std@0.90.0/testing/asserts.ts';
33

44
Clarinet.test({
5-
name: "Ensure that <...>",
5+
name: "A quick demo on how to assert expectations",
66
async fn(chain: Chain, accounts: Map<string, Account>) {
77
let wallet_1 = accounts.get('wallet_1')!;
88

@@ -25,6 +25,12 @@ Clarinet.test({
2525
block.receipts[3].result
2626
.expectUtf8('testing...');
2727

28+
let [event] = block.receipts[0].events;
29+
let {sender, recipient, amount} = event.stx_transfer_event;
30+
sender.expectPrincipal("ST1J4G6RR643BCG8G8SR6M2D9Z9KXT2NJDRK3FBTK");
31+
recipient.expectPrincipal("ST1HTBVD3JG9C05J7HBJTHGR0GGW7KXW28M5JS8QE.billboard");
32+
amount.expectInt(100);
33+
2834
assetMaps = chain.getAssetsMaps();
2935
assertEquals(assetMaps.assets['STX'][wallet_1.address], balance - 210);
3036
},

0 commit comments

Comments
 (0)