refactor: organize tests and extract formatting utilities

- Move test files to lib/__tests__/ directory
- Extract formatting utilities (formatVersion, formatFileSize, formatDateTime)
  from fs-utils.ts to new utils.ts module
- Add Jest test configuration and test scripts
- Update component imports to use new utils module
- Add CLAUDE.md documentation for project structure

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 02:33:30 +08:00
parent 17a23611b6
commit 8227f36cbe
11 changed files with 5861 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
// app/download/ApkCard.tsx
import { formatFileSize, formatDateTime } from '@/lib/fs-utils';
import { formatFileSize, formatDateTime } from '@/lib/utils';
interface ApkCardProps {
name: string;

View File

@@ -3,7 +3,7 @@
import { useState } from 'react';
import useSWR from 'swr';
import { formatVersion } from '@/lib/fs-utils';
import { formatVersion } from '@/lib/utils';
const fetcher = async (url: string) => {
const res = await fetch(url);