Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jul 11, 2024
1 parent 908e09e commit 93f3bd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/client_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ describe("Client", () => {
equal(await client.checkComment(ham), CheckResult.ham));

it("should return `CheckResult.spam` for invalid comment (e.g. spam)", async () => {
const isSpam = [CheckResult.spam, CheckResult.pervasiveSpam];
ok(isSpam.includes(await client.checkComment(spam)));
const isSpam = new Set([CheckResult.spam, CheckResult.pervasiveSpam]);
ok(isSpam.has(await client.checkComment(spam)));
});
});

Expand Down

0 comments on commit 93f3bd5

Please sign in to comment.