refactor: switch to using Bun (#718)

This commit is contained in:
Dan Ditomaso
2025-07-16 22:30:10 -04:00
committed by GitHub
parent acfd7ebd2d
commit 704d06cfe7
401 changed files with 35294 additions and 39107 deletions
@@ -1,7 +1,12 @@
import { vi } from "vitest";
vi.mock("@components/UI/Button.tsx", () => ({
Button: ({ children, name, disabled, onClick }: {
Button: ({
children,
name,
disabled,
onClick,
}: {
children: React.ReactNode;
variant: string;
name: string;
@@ -1,13 +1,15 @@
import { vi } from "vitest";
vi.mock("@components/UI/Checkbox.tsx", () => ({
Checkbox: (
{ id, checked, onChange }: {
id: string;
checked: boolean;
onChange: () => void;
},
) => (
Checkbox: ({
id,
checked,
onChange,
}: {
id: string;
checked: boolean;
onChange: () => void;
}) => (
<input
data-testid="checkbox"
type="checkbox"
@@ -1,10 +1,13 @@
import React from "react";
import type React from "react";
export const Dialog = ({ children, open }: {
export const Dialog = ({
children,
open,
}: {
children: React.ReactNode;
open: boolean;
onOpenChange?: (open: boolean) => void;
}) => open ? <div data-testid="dialog">{children}</div> : null;
}) => (open ? <div data-testid="dialog">{children}</div> : null);
export const DialogContent = ({
children,
@@ -12,19 +15,19 @@ export const DialogContent = ({
}: {
children: React.ReactNode;
className?: string;
}) => <div data-testid="dialog-content" className={className}>{children}</div>;
}) => (
<div data-testid="dialog-content" className={className}>
{children}
</div>
);
export const DialogHeader = ({
children,
}: {
children: React.ReactNode;
}) => <div data-testid="dialog-header">{children}</div>;
export const DialogHeader = ({ children }: { children: React.ReactNode }) => (
<div data-testid="dialog-header">{children}</div>
);
export const DialogTitle = ({
children,
}: {
children: React.ReactNode;
}) => <div data-testid="dialog-title">{children}</div>;
export const DialogTitle = ({ children }: { children: React.ReactNode }) => (
<div data-testid="dialog-title">{children}</div>
);
export const DialogDescription = ({
children,
@@ -33,7 +36,9 @@ export const DialogDescription = ({
children: React.ReactNode;
className?: string;
}) => (
<div data-testid="dialog-description" className={className}>{children}</div>
<div data-testid="dialog-description" className={className}>
{children}
</div>
);
export const DialogFooter = ({
@@ -42,4 +47,8 @@ export const DialogFooter = ({
}: {
children: React.ReactNode;
className?: string;
}) => <div data-testid="dialog-footer" className={className}>{children}</div>;
}) => (
<div data-testid="dialog-footer" className={className}>
{children}
</div>
);
@@ -1,13 +1,15 @@
import { vi } from "vitest";
vi.mock("@components/UI/Label.tsx", () => ({
Label: (
{ children, htmlFor, className }: {
children: React.ReactNode;
htmlFor: string;
className?: string;
},
) => (
Label: ({
children,
htmlFor,
className,
}: {
children: React.ReactNode;
htmlFor: string;
className?: string;
}) => (
<label data-testid="label" htmlFor={htmlFor} className={className}>
{children}
</label>
@@ -1,11 +1,17 @@
import { vi } from "vitest";
vi.mock("@components/UI/Typography/Link.tsx", () => ({
Link: (
{ children, href, className }: {
children: React.ReactNode;
href: string;
className?: string;
},
) => <a data-testid="link" href={href} className={className}>{children}</a>,
Link: ({
children,
href,
className,
}: {
children: React.ReactNode;
href: string;
className?: string;
}) => (
<a data-testid="link" href={href} className={className}>
{children}
</a>
),
}));