Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed app/src/components/ui/Badge.test.tsx,app/src/components/ui/Badge.tsx

Steven Enamakel5f3bde8718af
diff --git a/app/src/components/ui/Badge.test.tsx b/app/src/components/ui/Badge.test.tsx
index 0f9e6623ad..f6a3d6d199 100644
--- a/app/src/components/ui/Badge.test.tsx
+++ b/app/src/components/ui/Badge.test.tsx
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { describe, expect, it, vi } from 'vitest';
-import Badge, { badgeVariants, type BadgeVariant } from './Badge';
+import Badge, { type BadgeVariant, badgeVariants } from './Badge';
const VARIANTS: BadgeVariant[] = ['neutral', 'primary', 'success', 'warning', 'danger'];
@@ -18,15 +18,14 @@ describe('Badge', () => {
// The class list is the variant recipe verbatim — no extra utilities crept in.
expect(badge.getAttribute('class')).toBe(badgeVariants({ variant: undefined }));
// Nothing beyond the four attributes the component has always emitted.
- expect(Array.from(badge.attributes).map((attr) => attr.name).sort()).toEqual([
- 'class',
- 'data-slot',
- 'data-testid',
- 'data-variant',
- ]);
+ expect(
+ Array.from(badge.attributes)
+ .map(attr => attr.name)
+ .sort()
+ ).toEqual(['class', 'data-slot', 'data-testid', 'data-variant']);
});
- it.each(VARIANTS)('keeps the %s variant class list unchanged', (variant) => {
+ it.each(VARIANTS)('keeps the %s variant class list unchanged', variant => {
render(
<Badge data-testid="badge" variant={variant}>
Label
diff --git a/app/src/components/ui/Badge.tsx b/app/src/components/ui/Badge.tsx
index 56cca5990c..8802038e16 100644
--- a/app/src/components/ui/Badge.tsx
+++ b/app/src/components/ui/Badge.tsx
@@ -26,8 +26,7 @@ export const badgeVariants = cva(
export type BadgeVariant = NonNullable<VariantProps<typeof badgeVariants>['variant']>;
export interface BadgeProps
- extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,
- VariantProps<typeof badgeVariants> {
+ extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'>, VariantProps<typeof badgeVariants> {
children: ReactNode;
className?: string;
'data-testid'?: string;
@@ -40,13 +39,7 @@ export interface BadgeProps
* component-owned attributes are applied after `...rest` so the default render
* is identical whether or not extra props are passed.
*/
-const Badge = ({
- variant,
- children,
- className,
- 'data-testid': testId,
- ...rest
-}: BadgeProps) => (
+const Badge = ({ variant, children, className, 'data-testid': testId, ...rest }: BadgeProps) => (
<span
{...rest}
data-slot="badge"