From f7a44f85a894f84232b9971f5e5da2ceda782dbe Mon Sep 17 00:00:00 2001 From: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com> Date: Sat, 9 May 2026 21:32:09 +0200 Subject: [PATCH] refactor(PBI-49): remove data-debug-label from debugProps helper + test Co-Authored-By: Claude Sonnet 4.6 --- __tests__/lib/debug.test.ts | 3 +-- lib/debug.ts | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/__tests__/lib/debug.test.ts b/__tests__/lib/debug.test.ts index 96d6487..12a1e33 100644 --- a/__tests__/lib/debug.test.ts +++ b/__tests__/lib/debug.test.ts @@ -3,11 +3,10 @@ import { describe, it, expect, vi } from 'vitest' import { debugProps } from '@/lib/debug' describe('debugProps', () => { - it('returns both attrs with correct label in dev mode', () => { + it('returns data-debug-id attr in dev mode', () => { const result = debugProps('sprint-board', 'SprintBoard', 'components/sprint/sprint-board.tsx') expect(result).toEqual({ 'data-debug-id': 'sprint-board', - 'data-debug-label': 'SprintBoard — components/sprint/sprint-board.tsx', }) }) diff --git a/lib/debug.ts b/lib/debug.ts index 6339f64..1655eed 100644 --- a/lib/debug.ts +++ b/lib/debug.ts @@ -1,16 +1,14 @@ export type DebugProps = { 'data-debug-id': string - 'data-debug-label': string } export function debugProps( id: string, - component: string, - file: string + _component?: string, + _file?: string ): DebugProps | Record { if (process.env.NODE_ENV === 'production') return {} return { 'data-debug-id': id, - 'data-debug-label': `${component} — ${file}`, } }