refactor(JsonTools): 规范化页面组件目录结构

- 将子组件移至 components/ 子目录(JsonDiffInput、DiffResult、JsonFormatSection、JsonConvertSection、DiffNavigator、JsonTree)
- 将 diffEngine.ts 工具函数移至 src/utils/
- 提取 ConvertFunction/ConvertResult 类型到 types.ts,解决循环依赖
- 创建 __tests__/ 目录结构
- 更新所有相关导入路径

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
雨霖铃
2026-06-10 20:39:40 +08:00
parent 30d3561726
commit 016173a9c5
12 changed files with 33 additions and 20 deletions
@@ -0,0 +1,11 @@
import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import Index from '../index';
describe('JsonTools 页面', () => {
it('应该渲染页面标题', () => {
render(<Index />);
// 基本渲染测试
expect(screen.getByRole('button')).toBeInTheDocument();
});
});