Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Messages in Test Cases #178

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ownership-chain/e2e-tests/tests/test-create-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ describeWithExistingNode("Frontier RPC (Create Collection)", (context) => {
await contract.methods.owner().call();
expect.fail("Expected error was not thrown"); // Ensure an error is thrown
} catch (error) {
expect(error.message).to.be.eq(
"Returned error: VM Exception while processing transaction: revert"
const message = Buffer.from(error.data.substring(2), 'hex').toString();
expect(message).to.be.eq(
"invalid collection address"
);
}
});
Expand Down
5 changes: 3 additions & 2 deletions ownership-chain/e2e-tests/tests/test-evolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ describeWithExistingNode("Frontier RPC (Mint and Evolve Assets)", (context) => {
await collectionContract.methods.tokenURI(tokenId).call();
expect.fail("Expected error was not thrown"); // Ensure an error is thrown
} catch (error) {
expect(error.message).to.be.eq(
"Returned error: VM Exception while processing transaction: revert"
const message = Buffer.from(error.data.substring(2), 'hex').toString();
expect(message).to.be.eq(
"asset does not exist"
);
}
});
Expand Down