Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: competible error info
Browse files Browse the repository at this point in the history
fospring committed Dec 10, 2023
1 parent 2e954f3 commit a04ce8c
Showing 2 changed files with 4 additions and 14 deletions.
17 changes: 3 additions & 14 deletions examples/__tests__/standard-nft/test_core.ava.js
Original file line number Diff line number Diff line change
@@ -109,11 +109,7 @@ test("Transfer call fast return to sender", async (t) => {
},
{ attachedDeposit: "1", gas: MAX_GAS }
);
console.log("res.result=", res.result);
t.is(
Buffer.from(res.result.status.SuccessValue, "base64").toString(),
"false"
);
t.assert(res.result.status.Failure !== undefined || Buffer.from(res.result.status.SuccessValue, "base64").toString() === "false");

let token = await nft.view("nft_token", { token_id: "0" });
t.is(token.owner_id, nftOwner.accountId);
@@ -133,11 +129,7 @@ test("Transfer call slow return to sender", async (t) => {
},
{ attachedDeposit: "1", gas: MAX_GAS }
);
console.log("res.result=", res.result);
t.is(
Buffer.from(res.result.status.SuccessValue, "base64").toString(),
"false"
);
t.assert(res.result.status.Failure !== undefined || Buffer.from(res.result.status.SuccessValue, "base64").toString() === "false");

let token = await nft.view("nft_token", { token_id: "0" });
t.is(token.owner_id, nftOwner.accountId);
@@ -204,10 +196,7 @@ test("Transfer call receiver panics", async (t) => {
{ attachedDeposit: "1", gas: MAX_GAS }
);
console.log("res.result=", res.result);
t.is(
Buffer.from(res.result.status.SuccessValue, "base64").toString(),
"false"
);
t.assert(res.result.status.Failure !== undefined || Buffer.from(res.result.status.SuccessValue, "base64").toString() === "false");

t.is(res.logs.length, 3);

1 change: 1 addition & 0 deletions examples/__tests__/test-counter.ava.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import test from "ava";
test.beforeEach(async (t) => {
// Init the worker and start a Sandbox server
const worker = await Worker.init();
console.log(worker.config);

// Prepare sandbox for tests, create accounts, deploy contracts, etc.
const root = worker.rootAccount;

0 comments on commit a04ce8c

Please sign in to comment.