From faabfd7afc01b7c517a7c7c6e6c98364e31f9719 Mon Sep 17 00:00:00 2001 From: Dmitriy Kovalenko Date: Mon, 29 Apr 2024 16:24:43 +0200 Subject: [PATCH] Fix node bindgins tests --- test/node-binding.test.cjs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/node-binding.test.cjs b/test/node-binding.test.cjs index 9ae2a839..4c2cc8ec 100644 --- a/test/node-binding.test.cjs +++ b/test/node-binding.test.cjs @@ -54,12 +54,15 @@ 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) => { @@ -67,7 +70,10 @@ test("Correctly parses antialiasing", async (t) => { 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");