Skip to content

Commit a84fbdf

Browse files
committed
chore: reset the project for course
1 parent 8cbaad4 commit a84fbdf

12 files changed

Lines changed: 378 additions & 7040 deletions

File tree

package-lock.json

Lines changed: 368 additions & 6801 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,23 @@
3636
"tailwind-merge": "^3.2.0",
3737
"tailwindcss": "^4.1.4",
3838
"tw-animate-css": "^1.2.5",
39-
"twd-js": "^1.3.3",
4039
"zustand": "^5.0.3"
4140
},
4241
"devDependencies": {
43-
"@cypress/code-coverage": "^3.14.7",
4442
"@eslint/js": "^9.22.0",
45-
"@testing-library/dom": "^10.4.0",
46-
"@testing-library/jest-dom": "^6.6.3",
47-
"@testing-library/react": "^16.3.0",
48-
"@testing-library/user-event": "^14.6.1",
4943
"@types/node": "^22.14.1",
5044
"@types/react": "^19.1.8",
5145
"@types/react-dom": "^19.1.6",
5246
"@vitejs/plugin-react": "^4.3.4",
53-
"babel-plugin-istanbul": "^7.0.1",
5447
"eslint": "^9.22.0",
5548
"eslint-plugin-react-hooks": "^5.2.0",
5649
"eslint-plugin-react-refresh": "^0.4.19",
5750
"globals": "^16.0.0",
5851
"jsdom": "^26.1.0",
5952
"npm-run-all": "^4.1.5",
60-
"nyc": "^17.1.0",
61-
"puppeteer": "^24.29.1",
6253
"typescript": "~5.7.2",
6354
"typescript-eslint": "^8.26.1",
6455
"vite": "^6.3.1",
65-
"vite-plugin-istanbul": "^7.2.0",
6656
"vitest": "^3.2.4"
6757
}
6858
}

src/main.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import './index.css'
44
import { RouterProvider } from "react-router";
55
import router from './AppRoutes';
66

7-
if (import.meta.env.DEV) {
8-
const { initTWD } = await import('twd-js/bundled');
9-
const tests = import.meta.glob("./**/*.twd.test.ts")
10-
initTWD(tests);
11-
}
12-
137
createRoot(document.getElementById('root')!).render(
148
<StrictMode>
159
<RouterProvider router={router} />

src/pages/Helloworld/Helloworld.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function Helloworld() {
88
<div className="min-h-screen flex flex-col items-center justify-center p-8 bg-background">
99
<div className="text-center space-y-8 max-w-2xl">
1010
<div className="space-y-4">
11-
<h1 className="text-6xl font-bold text-foreground" data-testid="welcome-title">
11+
<h1 className="text-6xl font-bold text-foreground">
1212
Welcome to TWD
1313
</h1>
1414
<p className="text-xl text-muted-foreground">

src/pages/QRScanner/QRScanner.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useState } from 'react';
22
import { Scanner } from '@yudiel/react-qr-scanner';
33
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
4-
import { MockedComponent } from 'twd-js/ui';
54

65
export default function QRScanner() {
76
const [detectedCodes, setDetectedCodes] = useState<string[]>([]);
@@ -35,12 +34,10 @@ export default function QRScanner() {
3534
</CardHeader>
3635
<CardContent>
3736
<div className="w-full max-w-md mx-auto">
38-
<MockedComponent name="qrScanner">
39-
<Scanner
40-
onScan={handleScan}
41-
onError={(error: unknown) => handleError(error as Error)}
42-
/>
43-
</MockedComponent>
37+
<Scanner
38+
onScan={handleScan}
39+
onError={(error: unknown) => handleError(error as Error)}
40+
/>
4441
</div>
4542
</CardContent>
4643
</Card>

src/pages/TodoList/TodoItem.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export default function TodoItem({ todo }: TodoItemProps) {
1212
const isDeleting = deleteFetcher.state === "submitting" || deleteFetcher.state === "loading";
1313

1414
return (
15-
<Card data-testid="todo-item">
15+
<Card>
1616
<CardHeader>
17-
<CardTitle data-testid={`todo-title-${todo.id}`}>{todo.title}</CardTitle>
18-
<CardDescription data-testid={`todo-description-${todo.id}`}>{todo.description}</CardDescription>
17+
<CardTitle>{todo.title}</CardTitle>
18+
<CardDescription>{todo.description}</CardDescription>
1919
</CardHeader>
2020
<CardFooter className="flex justify-between items-center">
21-
<span className="text-sm text-muted-foreground" data-testid={`todo-date-${todo.id}`}>
21+
<span className="text-sm text-muted-foreground">
2222
Date: {todo.date}
2323
</span>
2424
<deleteFetcher.Form method="DELETE" action="/todos">
@@ -28,7 +28,6 @@ export default function TodoItem({ todo }: TodoItemProps) {
2828
variant="destructive"
2929
size="sm"
3030
disabled={isDeleting}
31-
data-testid={`delete-todo-${todo.id}`}
3231
>
3332
{isDeleting ? "Deleting..." : "Delete"}
3433
</Button>

src/pages/TodoList/TodoList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const TodoList = () => {
4747
method="POST"
4848
action="/todos"
4949
className="space-y-4"
50-
data-testid="todo-form"
5150
>
5251
<div>
5352
<Label htmlFor="title" className="mb-2">Title</Label>
@@ -98,7 +97,7 @@ const TodoList = () => {
9897
<div className="space-y-4">
9998
{todos.length === 0 ? (
10099
<Card>
101-
<CardContent className="py-8 text-center text-muted-foreground" data-testid="no-todos-message">
100+
<CardContent className="py-8 text-center text-muted-foreground">
102101
No todos yet. Create one above!
103102
</CardContent>
104103
</Card>

src/twd-tests/helloWorld.twd.test.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/twd-tests/mocks/todoList.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/twd-tests/qrScanner.twd.test.tsx

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)