Skip to content

Commit

Permalink
Fix node bindgins tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Apr 29, 2024
1 parent 490faad commit faabfd7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/node-binding.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,26 @@ test("Correctly parses threshold", async (t) => {
path.join(IMAGES_PATH, "donkey.png"),
path.join(IMAGES_PATH, "donkey-2.png"),
path.join(IMAGES_PATH, "diff.png"),
options
{
...options,
threshold: 0.5,
}
);

t.is(reason, "pixel-diff");
t.is(diffCount, 50332);
t.is(diffPercentage, 1.31007003768);
t.is(diffCount, 82109);
t.is(diffPercentage, 2.13717993968);
});

test("Correctly parses antialiasing", async (t) => {
const { reason, diffCount, diffPercentage } = await compare(
path.join(IMAGES_PATH, "donkey.png"),
path.join(IMAGES_PATH, "donkey-2.png"),
path.join(IMAGES_PATH, "diff.png"),
options
{
...options,
antialiasing: true,
}
);

t.is(reason, "pixel-diff");
Expand Down

0 comments on commit faabfd7

Please sign in to comment.