From 72e8ffe368942c3edb884d58e39567f739316106 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 25 Jan 2026 10:00:14 +0100 Subject: [PATCH] address unused variable lint See: https://github.com/PrivateBin/PrivateBin/security/quality/rules/js%2Funused-local-variable --- js/test/Helper.js | 2 +- js/test/PasteStatus.js | 2 +- js/test/Prompt.js | 2 +- js/test/TopNav.js | 44 +++++++++++++++++------------------- js/test/emailTemplateTest.js | 3 +-- 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/js/test/Helper.js b/js/test/Helper.js index 3cc1d1c5..548b6cac 100644 --- a/js/test/Helper.js +++ b/js/test/Helper.js @@ -126,7 +126,7 @@ describe('Helper', function () { clean(); urlString = $('
').text(urlString).html(); const expected = $('
').text(prefix).html() + '' + urlString + '' + $('
').text(postfix).html(); - return $('
').text(prefix).html() + '' + urlString + '' + $('
').text(postfix).html() === result; + return expected === result; } ); jsc.property( diff --git a/js/test/PasteStatus.js b/js/test/PasteStatus.js index f436cb3b..e35842b0 100644 --- a/js/test/PasteStatus.js +++ b/js/test/PasteStatus.js @@ -144,7 +144,7 @@ describe('PasteStatus', function () { common.jscUrl(), common.jscUrl(false), function (schema, longUrl, shortUrl) { - const [longUrlString, shortUrlString] = urlStrings(schema, longUrl, shortUrl), + const [_, shortUrlString] = urlStrings(schema, longUrl, shortUrl), yourlsResponse = '\n' + '\n' + '\t\n' + diff --git a/js/test/Prompt.js b/js/test/Prompt.js index ddbe8455..3ef7da26 100644 --- a/js/test/Prompt.js +++ b/js/test/Prompt.js @@ -10,7 +10,7 @@ describe('Prompt', function () { 'string', function (password) { password = password.replace(/\r+|\n+/g, ''); - const clean = jsdom('', {url: 'ftp://example.com/?0000000000000000'}); + /* const clean = */ jsdom('', {url: 'ftp://example.com/?0000000000000000'}); $('body').html( '