Skip to content

Commit

Permalink
Fixing tests for isHuman
Browse files Browse the repository at this point in the history
  • Loading branch information
nutrina committed Dec 22, 2023
1 parent de12511 commit 7eab28e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions test/GitcoinPassportDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ describe("GitcoinPassportDecoder", function () {

const currentVersion = await gitcoinPassportDecoder.currentVersion();

const savedProviders =
await gitcoinPassportDecoder.getProviders(currentVersion);
const savedProviders = await gitcoinPassportDecoder.getProviders(
currentVersion
);

expect(savedProviders.length === providers.length);
expect(savedProviders).to.eql(providers);
Expand Down Expand Up @@ -940,12 +941,10 @@ describe("GitcoinPassportDecoder", function () {
});
it("should return false if the score is below the threshold", async function () {
await gitcoinPassportDecoder.connect(ownerAccount).setThreshold(333456);
await expect(
gitcoinPassportDecoder.isHuman(recipientAccount.address)
).to.be.revertedWithCustomError(
gitcoinPassportDecoder,
"ScoreDoesNotMeetThreshold"
const isHuman = await gitcoinPassportDecoder.isHuman(
recipientAccount.address
);
expect(isHuman).to.equal(false);
});
});

Expand Down Expand Up @@ -1054,12 +1053,10 @@ describe("GitcoinPassportDecoder", function () {
});
it("should return false if the score is below the threshold", async function () {
await gitcoinPassportDecoder.connect(ownerAccount).setThreshold(333456);
await expect(
gitcoinPassportDecoder.isHuman(recipientAccount.address)
).to.be.revertedWithCustomError(
gitcoinPassportDecoder,
"ScoreDoesNotMeetThreshold"
const isHuman = await gitcoinPassportDecoder.isHuman(
recipientAccount.address
);
expect(isHuman).to.equal(false);
});
});
});
Expand Down

0 comments on commit 7eab28e

Please sign in to comment.