From acb99b6f8784c809b940f1d2cf745427e088e088 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 23 Jun 2024 23:22:06 +0100 Subject: [PATCH] update tests --- test/ExampleWorker.js | 1 + test/TestTools.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ExampleWorker.js b/test/ExampleWorker.js index 30c9ea1..11aeb15 100644 --- a/test/ExampleWorker.js +++ b/test/ExampleWorker.js @@ -185,6 +185,7 @@ const prepareEnvironment = options => { height: 600, style: {}, addEventListener: () => {}, + setAttribute: () => {}, getAttribute: name => ({ 'data-pixel-ratio': '1' }[name]), diff --git a/test/TestTools.js b/test/TestTools.js index 6e7108b..cfff50b 100644 --- a/test/TestTools.js +++ b/test/TestTools.js @@ -238,7 +238,7 @@ const extrinsicSimilarity = (currentCaptures, referenceCaptures, key='extrinsic' } } - result[name] = 1 - (totalSimilarity / totalCount); + result[name] = 1 - (totalSimilarity / (totalCount || 1)); } return result;