opencode-setup 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +242 -0
- package/dist/chunk-PKHQD5QT.js +1106 -0
- package/dist/cli.js +339 -0
- package/dist/index.js +170 -0
- package/dist/templates/agents/planner.md +10 -0
- package/dist/templates/agents/reviewer.md +12 -0
- package/dist/templates/agents/tester.md +5 -0
- package/dist/templates/agents-md/backend-go.md +28 -0
- package/dist/templates/agents-md/backend-python.md +27 -0
- package/dist/templates/agents-md/base.md +29 -0
- package/dist/templates/agents-md/frontend-ts.md +39 -0
- package/dist/templates/agents-md/fullstack.md +25 -0
- package/dist/templates/commands/lint.md +2 -0
- package/dist/templates/commands/plan.md +10 -0
- package/dist/templates/commands/review.md +6 -0
- package/dist/templates/commands/test.md +2 -0
- package/dist/templates/configs/balanced.json +10 -0
- package/dist/templates/configs/budget.json +10 -0
- package/dist/templates/configs/google-only.json +10 -0
- package/dist/templates/configs/minimax.json +10 -0
- package/dist/templates/configs/power.json +10 -0
- package/dist/templates/skills/code-review/SKILL.md +27 -0
- package/dist/templates/skills/frontend-design/SKILL.md +20 -0
- package/dist/templates/skills/testing/SKILL.md +19 -0
- package/package.json +83 -0
- package/templates/agents/planner.md +10 -0
- package/templates/agents/reviewer.md +12 -0
- package/templates/agents/tester.md +5 -0
- package/templates/agents-md/backend-go.md +28 -0
- package/templates/agents-md/backend-python.md +27 -0
- package/templates/agents-md/base.md +29 -0
- package/templates/agents-md/frontend-ts.md +39 -0
- package/templates/agents-md/fullstack.md +25 -0
- package/templates/commands/lint.md +2 -0
- package/templates/commands/plan.md +10 -0
- package/templates/commands/review.md +6 -0
- package/templates/commands/test.md +2 -0
- package/templates/configs/balanced.json +10 -0
- package/templates/configs/budget.json +10 -0
- package/templates/configs/google-only.json +10 -0
- package/templates/configs/minimax.json +10 -0
- package/templates/configs/power.json +10 -0
- package/templates/skills/code-review/SKILL.md +27 -0
- package/templates/skills/frontend-design/SKILL.md +20 -0
- package/templates/skills/testing/SKILL.md +19 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Create a detailed implementation plan for: $FEATURE
|
|
2
|
+
|
|
3
|
+
The plan should include:
|
|
4
|
+
1. Analysis of current codebase
|
|
5
|
+
2. Step-by-step implementation approach
|
|
6
|
+
3. Files to create or modify
|
|
7
|
+
4. Testing strategy
|
|
8
|
+
5. Potential risks
|
|
9
|
+
|
|
10
|
+
Save the plan to .opencode/plans/$FEATURE.md
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
4
|
+
"agent": {
|
|
5
|
+
"build": { "model": "anthropic/claude-sonnet-4-5" },
|
|
6
|
+
"plan": { "model": "google/gemini-2.5-flash" }
|
|
7
|
+
},
|
|
8
|
+
"theme": "opencode",
|
|
9
|
+
"autoupdate": true
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
4
|
+
"agent": {
|
|
5
|
+
"build": { "model": "anthropic/claude-sonnet-4-5" },
|
|
6
|
+
"plan": { "model": "anthropic/claude-opus-4-6", "reasoningEffort": "high" }
|
|
7
|
+
},
|
|
8
|
+
"theme": "opencode",
|
|
9
|
+
"autoupdate": true
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: 코드 리뷰 시 참조하는 체크리스트와 가이드라인. 코드 리뷰, PR 리뷰, 코드 품질 확인 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Code Review Checklist
|
|
6
|
+
|
|
7
|
+
## Security
|
|
8
|
+
- SQL injection, XSS, CSRF 취약점
|
|
9
|
+
- 민감한 데이터 노출 여부
|
|
10
|
+
- 인증/인가 누락
|
|
11
|
+
|
|
12
|
+
## Performance
|
|
13
|
+
- N+1 쿼리
|
|
14
|
+
- 불필요한 리렌더링
|
|
15
|
+
- 메모리 누수
|
|
16
|
+
- 큰 번들 사이즈
|
|
17
|
+
|
|
18
|
+
## Maintainability
|
|
19
|
+
- 단일 책임 원칙
|
|
20
|
+
- 함수/메서드 길이 (50줄 이하 권장)
|
|
21
|
+
- 네이밍 일관성
|
|
22
|
+
- 중복 코드
|
|
23
|
+
|
|
24
|
+
## Testing
|
|
25
|
+
- 새 기능에 테스트 존재하는지
|
|
26
|
+
- 엣지 케이스 커버
|
|
27
|
+
- 테스트 이름이 의도를 설명하는지
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: 프론트엔드 UI/UX 디자인 가이드. 컴포넌트 설계, 레이아웃, 접근성 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Frontend Design Guide
|
|
6
|
+
|
|
7
|
+
## Component Design
|
|
8
|
+
- 단일 책임: 한 컴포넌트는 한 가지 역할
|
|
9
|
+
- 합성 패턴 우선 (children, slots)
|
|
10
|
+
- Props는 5개 이하 권장
|
|
11
|
+
|
|
12
|
+
## Accessibility
|
|
13
|
+
- 시맨틱 HTML 사용
|
|
14
|
+
- ARIA 속성 적절히
|
|
15
|
+
- 키보드 네비게이션 지원
|
|
16
|
+
- 충분한 색상 대비
|
|
17
|
+
|
|
18
|
+
## Responsive
|
|
19
|
+
- 모바일 퍼스트
|
|
20
|
+
- breakpoint: 640px, 768px, 1024px, 1280px
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testing
|
|
3
|
+
description: 테스트 코드 작성 시 참조하는 패턴과 가이드라인. 테스트 작성, 테스트 전략, TDD 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Testing Guide
|
|
6
|
+
|
|
7
|
+
## Principles
|
|
8
|
+
- 각 테스트는 하나의 동작만 검증
|
|
9
|
+
- Given-When-Then 패턴
|
|
10
|
+
- 테스트 간 의존성 금지
|
|
11
|
+
- Mock은 최소한으로
|
|
12
|
+
|
|
13
|
+
## Naming
|
|
14
|
+
- test("should [expected behavior] when [condition]")
|
|
15
|
+
|
|
16
|
+
## Structure
|
|
17
|
+
- unit: 개별 함수/컴포넌트
|
|
18
|
+
- integration: 모듈 간 상호작용
|
|
19
|
+
- e2e: 사용자 시나리오
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-setup",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCode 환경 세팅 CLI + Plugin.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "mercuryPark",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/mercuryPark/oc-setup"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/mercuryPark/oc-setup#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/mercuryPark/oc-setup/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"opencode",
|
|
18
|
+
"setup",
|
|
19
|
+
"cli",
|
|
20
|
+
"developer-tools",
|
|
21
|
+
"ai-coding",
|
|
22
|
+
"claude-code",
|
|
23
|
+
"cursor",
|
|
24
|
+
"aider",
|
|
25
|
+
"configuration",
|
|
26
|
+
"automation"
|
|
27
|
+
],
|
|
28
|
+
"funding": {
|
|
29
|
+
"type": "github",
|
|
30
|
+
"url": "https://github.com/sponsors/mercurypark"
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/cli.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./cli": {
|
|
41
|
+
"import": "./dist/cli.js",
|
|
42
|
+
"default": "./dist/cli.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"bin": {
|
|
46
|
+
"opencode-setup": "./dist/cli.js"
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"dist",
|
|
50
|
+
"templates",
|
|
51
|
+
"README.md",
|
|
52
|
+
"LICENSE"
|
|
53
|
+
],
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup src/index.ts src/cli.ts --format esm --outDir dist --target node18 --external @opencode-ai/plugin --external zod --external commander --external @inquirer/prompts --clean && chmod +x dist/cli.js && sed -i '' '1s/^/#!\\/usr\\/bin\\/env node\\n/' dist/cli.js && rm -rf dist/templates && cp -r templates dist/templates",
|
|
59
|
+
"prepare": "npm run build",
|
|
60
|
+
"lint": "tsc --noEmit",
|
|
61
|
+
"test": "bun test",
|
|
62
|
+
"dev": "bun src/cli.ts"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@opencode-ai/plugin": "^1.0.0"
|
|
66
|
+
},
|
|
67
|
+
"peerDependenciesMeta": {
|
|
68
|
+
"@opencode-ai/plugin": {
|
|
69
|
+
"optional": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@inquirer/prompts": "latest",
|
|
74
|
+
"commander": "latest",
|
|
75
|
+
"zod": "latest"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/node": "latest",
|
|
79
|
+
"tsup": "latest",
|
|
80
|
+
"tsx": "latest",
|
|
81
|
+
"typescript": "latest"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "코드 리뷰 전문 에이전트"
|
|
3
|
+
permission:
|
|
4
|
+
write: deny
|
|
5
|
+
edit: deny
|
|
6
|
+
bash:
|
|
7
|
+
"git diff *": allow
|
|
8
|
+
"git log *": allow
|
|
9
|
+
"*": deny
|
|
10
|
+
---
|
|
11
|
+
You are a code reviewer. Provide constructive feedback without making direct changes.
|
|
12
|
+
Focus on security, performance, readability, and test coverage.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
Go 백엔드 프로젝트.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
- `cmd/` - 진입점
|
|
8
|
+
- `internal/` - 비즈니스 로직
|
|
9
|
+
- `pkg/` - 외부 공개 패키지
|
|
10
|
+
- `api/` - API 핸들러
|
|
11
|
+
|
|
12
|
+
## Code Standards
|
|
13
|
+
|
|
14
|
+
- gofmt 준수
|
|
15
|
+
- 에러 래핑: fmt.Errorf("context: %w", err)
|
|
16
|
+
- 전역 상태 금지, 생성자 주입
|
|
17
|
+
- 모든 exported 함수에 GoDoc 주석
|
|
18
|
+
|
|
19
|
+
## Testing
|
|
20
|
+
|
|
21
|
+
- go test ./...
|
|
22
|
+
- 테이블 기반 테스트
|
|
23
|
+
- testcontainers (DB 테스트)
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- 핸들러에 비즈니스 로직 금지
|
|
28
|
+
- 모든 DB 쿼리는 repository 인터페이스 경유
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
Python + FastAPI 프로젝트.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
- `app/` - 메인 애플리케이션
|
|
8
|
+
- `app/routers/` - API 라우터
|
|
9
|
+
- `app/models/` - Pydantic 모델
|
|
10
|
+
- `app/services/` - 비즈니스 로직
|
|
11
|
+
- `tests/` - 테스트
|
|
12
|
+
|
|
13
|
+
## Code Standards
|
|
14
|
+
|
|
15
|
+
- Python 3.12+
|
|
16
|
+
- Type hints 필수
|
|
17
|
+
- ruff로 린트/포맷
|
|
18
|
+
|
|
19
|
+
## Testing
|
|
20
|
+
|
|
21
|
+
- pytest
|
|
22
|
+
- httpx (AsyncClient)
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- 라우터에 비즈니스 로직 금지
|
|
27
|
+
- 모든 엔드포인트에 Pydantic 응답 모델 정의
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
{{projectDescription}}
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
{{structure}}
|
|
8
|
+
|
|
9
|
+
## Code Standards
|
|
10
|
+
|
|
11
|
+
{{codeStandards}}
|
|
12
|
+
|
|
13
|
+
## Testing
|
|
14
|
+
|
|
15
|
+
{{testingGuidelines}}
|
|
16
|
+
|
|
17
|
+
## Development Workflow
|
|
18
|
+
|
|
19
|
+
1. Plan 모드에서 기능 계획 수립
|
|
20
|
+
2. Build 모드에서 구현
|
|
21
|
+
3. /test 커맨드로 테스트 실행
|
|
22
|
+
4. /review 커맨드로 코드 리뷰
|
|
23
|
+
5. 수동 확인 후 커밋
|
|
24
|
+
|
|
25
|
+
{{#if rules}}
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
{{rules}}
|
|
29
|
+
{{/if}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
TypeScript + Next.js 프로젝트. App Router 사용.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
- `src/app/` - App Router 페이지 및 레이아웃
|
|
8
|
+
- `src/components/` - 재사용 컴포넌트
|
|
9
|
+
- `src/lib/` - 유틸리티, API 클라이언트
|
|
10
|
+
- `src/hooks/` - 커스텀 React 훅
|
|
11
|
+
- `src/types/` - TypeScript 타입 정의
|
|
12
|
+
|
|
13
|
+
## Code Standards
|
|
14
|
+
|
|
15
|
+
- TypeScript strict mode 활성화
|
|
16
|
+
- 함수형 컴포넌트 + React hooks 사용
|
|
17
|
+
- 네이밍: PascalCase (컴포넌트), camelCase (함수/변수), kebab-case (파일)
|
|
18
|
+
- 서버 컴포넌트 기본, 클라이언트는 필요시에만 'use client'
|
|
19
|
+
|
|
20
|
+
## Testing
|
|
21
|
+
|
|
22
|
+
- 테스트 러너: {{testRunner}}
|
|
23
|
+
- E2E: playwright
|
|
24
|
+
- 린트/포맷: {{linter}}
|
|
25
|
+
- 4단계: lint check → unit → integration → e2e
|
|
26
|
+
|
|
27
|
+
## Development Workflow
|
|
28
|
+
|
|
29
|
+
1. Plan 모드에서 기능 계획 수립
|
|
30
|
+
2. Build 모드에서 구현
|
|
31
|
+
3. /test 커맨드로 테스트 실행
|
|
32
|
+
4. /review 커맨드로 코드 리뷰
|
|
33
|
+
5. 수동 확인 후 커밋
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- 새 컴포넌트 작성 시 반드시 테스트 파일도 함께 생성
|
|
38
|
+
- API 호출은 src/lib/ 내 함수를 통해 수행
|
|
39
|
+
- 에러 바운더리를 페이지 단위로 설정
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
풀스택 프로젝트.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
- `frontend/` - 프론트엔드
|
|
8
|
+
- `backend/` - 백엔드
|
|
9
|
+
- `shared/` - 공유 타입/유틸
|
|
10
|
+
|
|
11
|
+
## Code Standards
|
|
12
|
+
|
|
13
|
+
- TypeScript strict mode (프론트+백)
|
|
14
|
+
- 공유 타입은 shared/ 경유
|
|
15
|
+
|
|
16
|
+
## Testing
|
|
17
|
+
|
|
18
|
+
- 프론트: {{testRunner}}
|
|
19
|
+
- 백: 프레임워크별 테스트 러너
|
|
20
|
+
- E2E: playwright
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
|
|
24
|
+
- API 계약은 shared/에 타입으로 정의
|
|
25
|
+
- 프론트-백 간 직접 import 금지, shared만 사용
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Create a detailed implementation plan for: $FEATURE
|
|
2
|
+
|
|
3
|
+
The plan should include:
|
|
4
|
+
1. Analysis of current codebase
|
|
5
|
+
2. Step-by-step implementation approach
|
|
6
|
+
3. Files to create or modify
|
|
7
|
+
4. Testing strategy
|
|
8
|
+
5. Potential risks
|
|
9
|
+
|
|
10
|
+
Save the plan to .opencode/plans/$FEATURE.md
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
4
|
+
"agent": {
|
|
5
|
+
"build": { "model": "anthropic/claude-sonnet-4-5" },
|
|
6
|
+
"plan": { "model": "google/gemini-2.5-flash" }
|
|
7
|
+
},
|
|
8
|
+
"theme": "opencode",
|
|
9
|
+
"autoupdate": true
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
4
|
+
"agent": {
|
|
5
|
+
"build": { "model": "anthropic/claude-sonnet-4-5" },
|
|
6
|
+
"plan": { "model": "anthropic/claude-opus-4-6", "reasoningEffort": "high" }
|
|
7
|
+
},
|
|
8
|
+
"theme": "opencode",
|
|
9
|
+
"autoupdate": true
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: 코드 리뷰 시 참조하는 체크리스트와 가이드라인. 코드 리뷰, PR 리뷰, 코드 품질 확인 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Code Review Checklist
|
|
6
|
+
|
|
7
|
+
## Security
|
|
8
|
+
- SQL injection, XSS, CSRF 취약점
|
|
9
|
+
- 민감한 데이터 노출 여부
|
|
10
|
+
- 인증/인가 누락
|
|
11
|
+
|
|
12
|
+
## Performance
|
|
13
|
+
- N+1 쿼리
|
|
14
|
+
- 불필요한 리렌더링
|
|
15
|
+
- 메모리 누수
|
|
16
|
+
- 큰 번들 사이즈
|
|
17
|
+
|
|
18
|
+
## Maintainability
|
|
19
|
+
- 단일 책임 원칙
|
|
20
|
+
- 함수/메서드 길이 (50줄 이하 권장)
|
|
21
|
+
- 네이밍 일관성
|
|
22
|
+
- 중복 코드
|
|
23
|
+
|
|
24
|
+
## Testing
|
|
25
|
+
- 새 기능에 테스트 존재하는지
|
|
26
|
+
- 엣지 케이스 커버
|
|
27
|
+
- 테스트 이름이 의도를 설명하는지
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: 프론트엔드 UI/UX 디자인 가이드. 컴포넌트 설계, 레이아웃, 접근성 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Frontend Design Guide
|
|
6
|
+
|
|
7
|
+
## Component Design
|
|
8
|
+
- 단일 책임: 한 컴포넌트는 한 가지 역할
|
|
9
|
+
- 합성 패턴 우선 (children, slots)
|
|
10
|
+
- Props는 5개 이하 권장
|
|
11
|
+
|
|
12
|
+
## Accessibility
|
|
13
|
+
- 시맨틱 HTML 사용
|
|
14
|
+
- ARIA 속성 적절히
|
|
15
|
+
- 키보드 네비게이션 지원
|
|
16
|
+
- 충분한 색상 대비
|
|
17
|
+
|
|
18
|
+
## Responsive
|
|
19
|
+
- 모바일 퍼스트
|
|
20
|
+
- breakpoint: 640px, 768px, 1024px, 1280px
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testing
|
|
3
|
+
description: 테스트 코드 작성 시 참조하는 패턴과 가이드라인. 테스트 작성, 테스트 전략, TDD 시 사용.
|
|
4
|
+
---
|
|
5
|
+
# Testing Guide
|
|
6
|
+
|
|
7
|
+
## Principles
|
|
8
|
+
- 각 테스트는 하나의 동작만 검증
|
|
9
|
+
- Given-When-Then 패턴
|
|
10
|
+
- 테스트 간 의존성 금지
|
|
11
|
+
- Mock은 최소한으로
|
|
12
|
+
|
|
13
|
+
## Naming
|
|
14
|
+
- test("should [expected behavior] when [condition]")
|
|
15
|
+
|
|
16
|
+
## Structure
|
|
17
|
+
- unit: 개별 함수/컴포넌트
|
|
18
|
+
- integration: 모듈 간 상호작용
|
|
19
|
+
- e2e: 사용자 시나리오
|