Skip to content

Commit

Permalink
fixed the test
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjimvalkema committed Feb 27, 2024
1 parent ffac70b commit 7fbb419
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/snap/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ describe('happyHarpie', () => {
const response = await onTransaction(transaction);

//get info
const harpieTransactionInformation = await harpieFunctions.getTransactionInformation(transaction)
const contractName = await harpieFunctions.getAddressName(String(transaction.to))

const harpieTransactionInformation = await harpieFunctions.createInformationMessage(transaction)

//checks if the info rendered matches that with what onTransaction(transaction) made from simulating
//this is from jest https://jestjs.io/docs/getting-started
expect(response).toRender(
panel([
heading(String(harpieTransactionInformation['summary'])),
text(`Sending transaction to ${contractName}`),
text(String(JSON.stringify(harpieTransactionInformation))),
heading(harpieTransactionInformation.header),
text(harpieTransactionInformation.body)
]),
);
});
Expand Down

0 comments on commit 7fbb419

Please sign in to comment.