From 646025589b73bdf4b55da1604a093c9ab52b616d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joona=20Heikkil=C3=A4?= <21111572+cxcorp@users.noreply.github.com> Date: Wed, 11 May 2022 23:15:34 +0300 Subject: [PATCH] Fix global variable assignment in JS test suite In test_imgproc.js, the test_filter suite's last test assigns a variable to `size` without declaring it with `let`, polluting the global scope. This commit adds `let` to the statement, so that the variable is scoped to the test block. --- modules/js/test/test_imgproc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/js/test/test_imgproc.js b/modules/js/test/test_imgproc.js index 9ba5cd4e38..e643388412 100644 --- a/modules/js/test/test_imgproc.js +++ b/modules/js/test/test_imgproc.js @@ -948,7 +948,7 @@ QUnit.test('test_filter', function(assert) { cv.rotate(src, dst, cv.ROTATE_90_CLOCKWISE); - size = dst.size(); + let size = dst.size(); assert.equal(size.height, 2, "ROTATE_HEIGHT"); assert.equal(size.width, 3, "ROTATE_WIGTH");