mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-07 16:41:00 +01:00
setup i18n and ported all tools to standalone pages
This commit is contained in:
@@ -22,7 +22,14 @@ describe('Tool Categories Configuration', () => {
|
||||
|
||||
// **KEY CHANGE**: This test now ensures IDs are unique only WITHIN this specific category.
|
||||
it('should not contain any duplicate tool IDs within its own list', () => {
|
||||
const toolIds = category.tools.map((tool) => tool.id);
|
||||
const toolIds = category.tools.map((tool) => {
|
||||
if ('id' in tool) return (tool as any).id;
|
||||
if ('href' in tool) {
|
||||
const match = (tool as any).href.match(/\/([^/]+)\.html$/);
|
||||
return match ? match[1] : (tool as any).href;
|
||||
}
|
||||
return 'unknown';
|
||||
});
|
||||
const uniqueToolIds = new Set(toolIds);
|
||||
|
||||
// This assertion checks for duplicates inside THIS category only.
|
||||
|
||||
Reference in New Issue
Block a user