Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions __mocks__/lucide-react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,32 @@
import type { ReactElement } from 'react';

/**
* Stub for the Trash2 icon; renders a bare SVG element so tests can locate the icon by test ID.
* Stub for the LocateFixed icon; renders a bare SVG element so tests can locate the icon by test
* ID.
*
* @param props - SVG props forwarded from the component, including optional className and size.
* @returns A ReactElement SVG element used as a trash icon stub in tests.
* @param props - SVG props forwarded from the component, including optional className.
* @returns A ReactElement SVG element used as a locate-fixed icon stub in tests.
*/
export function Trash2(props: Readonly<{ className?: string; size?: number }>): ReactElement {
return <svg data-testid="trash-icon" {...props} />;
export function LocateFixed(props: Readonly<{ className?: string }>): ReactElement {
return <svg data-testid="locate-fixed-icon" {...props} />;
}

/**
* Stub for the Info icon; renders a bare SVG element so tests can locate the icon by test ID.
* Stub for the Info icon.
*
* @param props - SVG props forwarded from the component, including optional className and size.
* @param props - SVG props forwarded from the component.
* @returns A ReactElement SVG element used as an info icon stub in tests.
*/
export function Info(props: Readonly<{ className?: string; size?: number }>): ReactElement {
export function Info(props: Readonly<{ size?: number; className?: string }>): ReactElement {
return <svg data-testid="info-icon" {...props} />;
}

/**
* Stub for the Trash2 icon.
*
* @param props - SVG props forwarded from the component.
* @returns A ReactElement SVG element used as a trash icon stub in tests.
*/
export function Trash2(props: Readonly<{ size?: number; className?: string }>): ReactElement {
return <svg data-testid="trash2-icon" {...props} />;
}
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const config: Config = {
'!src/**/*.spec.{ts,tsx}',
'!src/types/**',
'!src/utils/interlinear-project-summary.ts',
'!src/components/component-types.ts',
],

/** Directory for coverage output. */
Expand Down
Loading
Loading