From 11b01dfccbf166a0cffa33098392e64f6b303533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 6 Dec 2025 20:44:51 -0500 Subject: [PATCH] test: fix tests --- public/src/modules/helpers.common.js | 2 +- test/template-helpers.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.js index a4b77c0802..a33e7af8c7 100644 --- a/public/src/modules/helpers.common.js +++ b/public/src/modules/helpers.common.js @@ -113,7 +113,7 @@ module.exports = function (utils, Benchpress, relative_path) { } const href = tag === 'a' ? `href="${relative_path}/category/${category.slug}"` : ''; - return `<${tag} ${href} component="topic/category" class="badge px-1 text-truncate text-decoration-none ${className}" style="color: ${category.color};background-color: ${category.bgColor};border-color: ${category.bgColor}!important; max-width: 70vw;"> + return `<${tag} component="topic/category" ${href} class="badge px-1 text-truncate text-decoration-none ${className}" style="color: ${category.color};background-color: ${category.bgColor};border-color: ${category.bgColor}!important; max-width: 70vw;"> ${category.icon && category.icon !== 'fa-nbb-none' ? `` : ''} ${category.name} `; diff --git a/test/template-helpers.js b/test/template-helpers.js index b0bbb334c5..ea4d142354 100644 --- a/test/template-helpers.js +++ b/test/template-helpers.js @@ -107,7 +107,7 @@ describe('helpers', () => { imageClass: 'auto', name: 'Category 1', }, 'a', ''), - `\n\t\t\t\n\t\t\tCategory 1\n\t\t` + `\n\t\t\t\n\t\t\tCategory 1\n\t\t` ); assert.strictEqual( helpers.buildCategoryLabel({ @@ -118,7 +118,7 @@ describe('helpers', () => { name: 'Category 1', icon: 'fa-book', }, 'span', 'rounded-1'), - `\n\t\t\t\n\t\t\tCategory 1\n\t\t`, + `\n\t\t\t\n\t\t\tCategory 1\n\t\t`, ); done(); });