https://github.com/malintha-induwara/coding-test-bench
Easy way to practice and test coding challenges within your own editor.
https://github.com/malintha-induwara/coding-test-bench
coding-challenge testing typescript
Last synced: 11 months ago
JSON representation
Easy way to practice and test coding challenges within your own editor.
- Host: GitHub
- URL: https://github.com/malintha-induwara/coding-test-bench
- Owner: malintha-induwara
- License: mit
- Created: 2025-03-26T11:15:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-26T11:18:55.000Z (over 1 year ago)
- Last Synced: 2025-03-26T12:26:56.370Z (over 1 year ago)
- Topics: coding-challenge, testing, typescript
- Language: TypeScript
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Coding Test Bench
Coding Test Bench is an easy way to practice and test coding challenges within your own editor. This project provides a structured environment to solve algorithms and data structure problems, test your solutions, and maintain an archive of your previous attempts.
## Prerequisites
- [Node.js](https://nodejs.org/) (v14 or higher)
- [npm](https://www.npmjs.com/) (v6 or higher)
## Installation
1. Clone the repository:
```bash
git clone https://github.com/malintha-induwara/coding-test-bench.git
cd coding-test-bench
```
2. Install dependencies:
```bash
npm install
```
## Commands
| Command | Description |
| ------------------ | ---------------------------------------------------- |
| `npm run generate` | Generates challenge files based on the configuration |
| `npm run test` | Runs tests on your challenge solutions |
| `npm run save` | Archives your current solutions |
| `npm run clean` | Cleans the challenges directory |
## Adding New Challenges
### 1. Define the challenge template
Add your challenge to `scripts/templates.ts`:
```typescript
{
name: "newChallenge",
template: "export default function newChallenge(param: ParamType): ReturnType {\n \n}\n"
}
```
### 2. Update the challenges configuration
Add your challenge name to `challenges.config.json`:
```json
{
"challenges": ["helloWorld","binarySearch", "bubbleSort", "findSum", "newChallenge"]
}
```
### 3. Create test cases
Create test files in the `__tests__` directory for your new challenge.
## Workflow
1. Generate challenges: `npm run generate`
2. Solve the challenges in the `src/challenges` directory
3. Run tests to verify your solutions: `npm run test`
4. Save your solutions to the archive: `npm run save`
5. Clean up for a fresh start: `npm run clean`
## Available Challenges
Currently, the following challenges are available:
- Hello World (For Testing)
- Binary Search
- Bubble Sort
- Find Sum
## Project Structure
```
test-bench/
├── src/
│ ├── challenges/ # Generated challenge files
│ ├── archive/ # Archived solutions
├── __tests__/ # Test files
├── scripts/ # Utility scripts
│ ├── save.ts # Script to archive solutions
│ ├── templates.ts # Challenge templates
├── challenges.config.json # Challenge configuration
```
## Tech Stack



## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.