Skip to content

feat: test file parser, config file handler, moved symbol detection#11

Merged
3rdflr merged 2 commits intomainfrom
feat/test-config-moved-detection
Feb 23, 2026
Merged

feat: test file parser, config file handler, moved symbol detection#11
3rdflr merged 2 commits intomainfrom
feat/test-config-moved-detection

Conversation

@3rdflr
Copy link
Owner

@3rdflr 3rdflr commented Feb 23, 2026

Summary

  • 테스트 파일 파서: .test.ts 감지 후 describe/it 블록을 파싱해 suite별로 그룹화된 테스트 케이스 목록 출력
  • Config 파일 핸들러: vitest.config.ts 등 설정 파일은 플러그인/설정 import 변화만 간결하게 출력
  • Moved 심볼 감지: 함수가 removed이면서 동시에 새 import로 추가된 경우 ❌ 제거됨 대신 📦 다른 파일로 이동됨으로 재분류

Before / After

Before (formatters.test.ts)

Import 변화
+ describe
+ it
+ expect
+ formatDate
+ formatPrice

After

테스트: `formatDate`
  + 날짜 문자열을 한국어 형식으로 변환한다
  + 1자리 월/일도 올바르게 변환한다

테스트: `formatPrice`
  + price가 0이면 가격 미정을 반환한다
  + 일본 가격은 엔 단위로 표시한다
  + 한국 가격은 원 단위로 표시한다

Test plan

  • .test.ts 파일에서 describe/it 블록이 올바르게 파싱되는지 확인
  • vitest.config.ts 파일에서 설정값 변화만 출력되는지 확인
  • 리팩터링 PR에서 제거된 함수가 moved로 표시되는지 확인
  • 기존 일반 컴포넌트/함수 파싱에 regression 없는지 확인

🤖 Generated with Claude Code

3rdflr and others added 2 commits February 23, 2026 00:43
…ection

- isTestFile / isConfigFile: detect .test.ts and *.config.ts filenames
- extractTestCases: parse describe/it blocks from diff lines
- generateTestFileSummary: group test cases by suite with +/- markers
- generateReaderMarkdown: route test/config files to dedicated handlers
  before the standard symbol pipeline
- moved detection: symbols removed from a file but appearing in newly
  added imports are reclassified as 📦 moved rather than ❌ removed
- STATUS_ICON/LABEL: add 'moved' entry (📦 / 다른 파일로 이동됨)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

📖 PR #11 — feat: test file parser, config file handler, moved symbol detection

Repository: 3rdflr/github-mobile-reader
Commit: 24e41d0
변경된 JS/TS 파일: 1개


📄 src/parser.ts

isTestFile (Function) — 새로 추가
파라미터+ filename

  • 반환: /\.(test|spec)\.(js|jsx|ts|tsx)$/.test(filename)

isConfigFile (Function) — 새로 추가
파라미터+ filename
Props+ suite: string; // describe block name
Props+ name: string; // it/test block name

extractTestCases (Function) — 새로 추가
파라미터+ addedLines

generateTestFileSummary (Function) — 새로 추가
변수: currentSuite, suiteMatch, caseMatch
Props+ addedLines: string[]
Props+ removedLines: string[]

✏️ generateSymbolSections (Function) — 변경됨
변수: addedCases, removedCases, suiteMap, key, label

  • 조건: sym.status !== "removed" && sym.status !== "moved"
  • 조건: sym.status !== "removed"
  • 조건: sym.status !== "added" && sym.removedLines.length > 0

generateReaderMarkdown (Function) — 새로 추가
변수: configImports, symbolDiffs, fileImportChanges, newlyImported

  • 조건: meta.file && isTestFile(meta.file)
  • 반환: sections.join("\n")
  • 조건: meta.file && isConfigFile(meta.file)

🛠 Auto-generated by github-mobile-reader. Do not edit manually.

@3rdflr 3rdflr merged commit 03bd5d9 into main Feb 23, 2026
1 check passed
@3rdflr 3rdflr deleted the feat/test-config-moved-detection branch February 23, 2026 05:54
3rdflr added a commit that referenced this pull request Feb 23, 2026
feat: test file parser, config file handler, moved symbol detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant