Skip to content

Commit

Permalink
✅ test: Add comprehensive test suite for codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultyou committed Oct 24, 2024
1 parent 834038a commit f319dde
Show file tree
Hide file tree
Showing 77 changed files with 4,473 additions and 582 deletions.
5 changes: 5 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ANTHROPIC_API_KEY=test-anthropic-key
FORCE_REGENERATE=false
CLI_ENV=cli
NODE_ENV=test
LOG_LEVEL=error
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
dist/
node_modules/
archive/
coverage/

# Ignore local database
*.sqlite

# Ignore aider files
.aider*

# Ignore macOS files
.DS_Store

Expand Down
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,8 @@ Welcome to the **Prompt Library**, a collection of categorized AI prompts for ea

## 📚 Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [🎯 Purpose & Features](#-purpose--features)
- [⚡ Quick Start](#-quick-start)
- [🛠️ How It Works](#-how-it-works)
- [🖥️ CLI Usage](#-cli-usage)
- [Interactive Menu](#interactive-menu)
- [List Prompts and Categories](#list-prompts-and-categories)
- [Sync Personal Library](#sync-personal-library)
- [Execute Prompts](#execute-prompts)
- [📂 Prompt Library Example](#-prompt-library-example)
- [🚀 Getting Started](#-getting-started)
- [🧩 Using Fragments](#-using-fragments)
- [⚙️ Metadata Customization](#-metadata-customization)
- [🤝 Contributing](#-contributing)
- [📄 License](#-license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- START doctoc -->
<!-- END doctoc -->

## 🎯 Purpose & Features

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

</details>
Expand All @@ -143,8 +126,8 @@ prompt-library-cli execute --help
<details>
<summary><strong>Healthcare</strong></summary>

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

</details>
<details>
Expand Down
23 changes: 17 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/tests/**/*.test.ts'],
globals: {
'ts-jest': {
setupFiles: ['<rootDir>/jest.setup.ts'],
testMatch: ['<rootDir>/src/**/__tests__/**/*.test.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
transform: {
'^.+\\.ts?$': ['ts-jest', {
tsconfig: 'tsconfig.test.json'
}
}
};
}]
},
collectCoverage: true,
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/'
]
};
10 changes: 10 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as path from 'path';
import dotenv from 'dotenv';

const originalEnv = { ...process.env };
const envTestPath = path.resolve(__dirname, '.env.test');
dotenv.config({ path: envTestPath });

process.env.NODE_ENV = 'test';

export { originalEnv };
140 changes: 132 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f319dde

Please sign in to comment.