fix: 清理 typecheck 报错并修正迁移列名

- 加入缺失的 @testing-library/dom 依赖(RTL v16 必需 peer),修复 screen 导入
- 修正测试文件错误的相对导入路径(header 改具名导入;prompts/courses 指向 ../page)
- 修正联盟/打赏迁移 SQL:Prisma 列名为 camelCase(仅 @@map 映射表名),原 snake_case 列名导致查询 500,已重建表
- npm run typecheck 现已通过(EXIT=0)
This commit is contained in:
TradeMate Dev
2026-07-11 20:00:14 +08:00
parent 6850ceff56
commit 4ee0e546e3
7 changed files with 776 additions and 581 deletions
Generated Executable → Regular
+741 -549
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -64,6 +64,7 @@
},
"devDependencies": {
"@playwright/test": "^1.60.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/dompurify": "^3.0.5",
@@ -75,6 +76,6 @@
"eslint": "^8.57.1",
"eslint-config-next": "^16.2.6",
"jsdom": "^29.1.1",
"vitest": "^4.1.5"
"vitest": "^4.1.10"
}
}
@@ -1,6 +1,6 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { render, screen } from '@testing-library/react';
import CoursesPage from '../app/courses/page';
import CoursesPage from '../page';
describe('Courses Page', () => {
it('should render courses page', () => {
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import PromptsPage from '../app/prompts/page';
import PromptsPage from '../page';
describe('Prompts Page', () => {
it('should render prompts page', () => {
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import Header from '../header';
import { Header } from '../header';
describe('Header Component', () => {
it('should render navigation links', () => {