Skip to content

Commit 8046d4e

Browse files
committed
✅ test: Add comprehensive test suite for codebase
1 parent 834038a commit 8046d4e

File tree

77 files changed

+4395
-585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+4395
-585
lines changed

.env.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ANTHROPIC_API_KEY=test-anthropic-key
2+
FORCE_REGENERATE=false
3+
CLI_ENV=cli
4+
NODE_ENV=test
5+
LOG_LEVEL=error

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
dist/
66
node_modules/
77
archive/
8+
coverage/
89

910
# Ignore local database
1011
*.sqlite
1112

13+
# Ignore aider files
14+
.aider*
15+
1216
# Ignore macOS files
1317
.DS_Store
1418

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,8 @@ Welcome to the **Prompt Library**, a collection of categorized AI prompts for ea
66

77
## 📚 Table of Contents
88

9-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
10-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
11-
12-
- [🎯 Purpose & Features](#-purpose--features)
13-
- [⚡ Quick Start](#-quick-start)
14-
- [🛠️ How It Works](#-how-it-works)
15-
- [🖥️ CLI Usage](#-cli-usage)
16-
- [Interactive Menu](#interactive-menu)
17-
- [List Prompts and Categories](#list-prompts-and-categories)
18-
- [Sync Personal Library](#sync-personal-library)
19-
- [Execute Prompts](#execute-prompts)
20-
- [📂 Prompt Library Example](#-prompt-library-example)
21-
- [🚀 Getting Started](#-getting-started)
22-
- [🧩 Using Fragments](#-using-fragments)
23-
- [⚙️ Metadata Customization](#-metadata-customization)
24-
- [🤝 Contributing](#-contributing)
25-
- [📄 License](#-license)
26-
27-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
9+
<!-- START doctoc -->
10+
<!-- END doctoc -->
2811

2912
## 🎯 Purpose & Features
3013

@@ -128,9 +111,9 @@ prompt-library-cli execute --help
128111
- [Git Branch Name Generator](prompts/git_branch_name_generator/README.md) - Generates optimized git branch names based on project context and user requirements
129112
- [Git Commit Message Agent](prompts/git_commit_message_agent/README.md) - Generates precise and informative git commit messages following Conventional Commits specification
130113
- [GitHub Issue Creator](prompts/github_issue_creator_agent/README.md) - Creates comprehensive and actionable GitHub issues based on provided project information
131-
- [Software Architect Visionary](prompts/software_architect_agent/README.md) - Analyzes user requirements and creates comprehensive software specification documents
132114
- [Software Architect Code Reviewer](prompts/software_architect_code_reviewer/README.md) - Generates comprehensive pull requests with architectural analysis and optimization suggestions
133115
- [Software Architect Specification Creator](prompts/software_architect_spec_creator/README.md) - Creates comprehensive software specification documents based on user requirements
116+
- [Software Architect Visionary](prompts/software_architect_agent/README.md) - Analyzes user requirements and creates comprehensive software specification documents
134117
- [Software Development Expert Agent](prompts/software_dev_expert_agent/README.md) - Provides expert, adaptive assistance across all aspects of the software development lifecycle.
135118

136119
</details>
@@ -143,8 +126,8 @@ prompt-library-cli execute --help
143126
<details>
144127
<summary><strong>Healthcare</strong></summary>
145128

146-
- [Psychological Support and Therapy Agent](prompts/psychological_support_agent/README.md) - Provides AI-driven psychological support and therapy through digital platforms
147129
- [Health Optimization Agent](prompts/health_optimization_agent/README.md) - Generates personalized, adaptive health optimization plans based on comprehensive user data analysis
130+
- [Psychological Support and Therapy Agent](prompts/psychological_support_agent/README.md) - Provides AI-driven psychological support and therapy through digital platforms
148131

149132
</details>
150133
<details>

jest.config.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
4-
testMatch: ['**/tests/**/*.test.ts'],
5-
globals: {
6-
'ts-jest': {
4+
setupFiles: ['<rootDir>/jest.setup.ts'],
5+
testMatch: ['<rootDir>/src/**/__tests__/**/*.test.ts'],
6+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
7+
moduleNameMapper: {
8+
'^@/(.*)$': '<rootDir>/src/$1'
9+
},
10+
transform: {
11+
'^.+\\.ts?$': ['ts-jest', {
712
tsconfig: 'tsconfig.test.json'
8-
}
9-
}
10-
};
13+
}]
14+
},
15+
collectCoverage: true,
16+
coverageDirectory: 'coverage',
17+
coveragePathIgnorePatterns: [
18+
'/node_modules/',
19+
'/dist/'
20+
]
21+
};

jest.setup.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as path from 'path';
2+
import dotenv from 'dotenv';
3+
4+
const originalEnv = { ...process.env };
5+
const envTestPath = path.resolve(__dirname, '.env.test');
6+
dotenv.config({ path: envTestPath });
7+
8+
process.env.NODE_ENV = 'test';
9+
10+
export { originalEnv };

package-lock.json

Lines changed: 132 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)