From 742dda6e610c872b0762d844513f7b6b1a2f6d89 Mon Sep 17 00:00:00 2001 From: Daniel Cukier Date: Fri, 6 Jan 2023 16:23:40 -0300 Subject: [PATCH] fix expect syntax the expect syntax seems to return always true. Changed for the correct usage according to https://www.chaijs.com/guide/styles/#expect --- tests/anchor-counter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/anchor-counter.ts b/tests/anchor-counter.ts index 5e7710e..e714aa3 100644 --- a/tests/anchor-counter.ts +++ b/tests/anchor-counter.ts @@ -21,7 +21,7 @@ describe("anchor-counter", () => { .rpc() const account = await program.account["counter"].fetch(counter.publicKey) - expect(account.count.toNumber() === 0) + expect(account.count.toNumber()).to.equal(0) }) it("Incremented the count", async () => { @@ -31,7 +31,7 @@ describe("anchor-counter", () => { .rpc() const account = await program.account["counter"].fetch(counter.publicKey) - expect(account.count.toNumber() === 1) + expect(account.count.toNumber()).to.equal(1) }) it("Decremented the count", async () => { @@ -41,6 +41,6 @@ describe("anchor-counter", () => { .rpc() const account = await program.account["counter"].fetch(counter.publicKey) - expect(account.count.toNumber() === 0) + expect(account.count.toNumber()).to.equal(0) }) })