https://github.com/muhdhanish/node_solid_vitest
Node Solid Server is a project aimed at demonstrating how to implement testing using the Vitest framework in a TypeScript-based Node.js project following clean architecture principles.
https://github.com/muhdhanish/node_solid_vitest
clean-architecture eslint nodejs solid-principles testing typescript vitest vitest-ts
Last synced: 7 months ago
JSON representation
Node Solid Server is a project aimed at demonstrating how to implement testing using the Vitest framework in a TypeScript-based Node.js project following clean architecture principles.
- Host: GitHub
- URL: https://github.com/muhdhanish/node_solid_vitest
- Owner: MuhdHanish
- Created: 2024-03-31T05:25:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-06T03:11:44.000Z (over 1 year ago)
- Last Synced: 2025-01-30T13:13:16.111Z (9 months ago)
- Topics: clean-architecture, eslint, nodejs, solid-principles, testing, typescript, vitest, vitest-ts
- Language: TypeScript
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Solid Server Vitest
Node Solid Server is a project aimed at demonstrating how to implement testing using the Vitest framework in a TypeScript-based Node.js project following clean architecture principles.
## Directory Structure
- entities/
├── appointment.ts # Entity definition for appointments
├── appointment.spec.ts # Test file for appointment entity- repositories/
├── appointments-repository.ts # Interface for appointments repository├── in-memory-appointments-repository.ts # In-memory implementation of appointments repository
- use-cases/
├── create-appointment.ts # Use case for creating appointments
└── create-appointment.spec.ts # Test file for create-appointment use case- tests/
├── utils/
│ ├── get-future-date.ts # Utility function for getting future dates│ └── get-future-date.spec.ts # Test file for get-future-date utility
- package.json # Node.js package configuration file
- package-lock.json # Lock file for npm dependencies
- tsconfig.json # TypeScript configuration file
- vite.config.ts # Vite configuration file
- .eslintrc.js # ESLint configuration file
- README.md # Documentation for your project
- .gitignore # Git ignore file to exclude certain files/directories## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Dependencies](#dependencies)
- [Feedback](#feedback)
- [Contributing](#contributing)
- [Support](#support)## Installation
1. Clone the repository.
2. Run `npm install` to install dependencies.
2. Run `npm run dev` to start testing.## Usage
Node Solid Server can be used for:
- Implementing and testing new features following clean architecture principles.
- Writing tests using the Vitest framework to ensure the correctness of implemented features.
- Executing tests with Vitest to validate the functionality of the application.
- Integrating the project into larger Node.js applications to demonstrate effective structuring and testing practices.## Dependencies
- `typescript`: A superset of JavaScript that adds static typing to the language.
- `date-fns`: Modern JavaScript date utility library that provides various functions to work with dates
- `eslint`: JavaScript and TypeScript linter.
- `vitest`: Lightweight test runner for JavaScript and TypeScript.## Feedback
If you have any feedback, please reach me at [muhammedhanish11@gmail.com](mailto:muhammedhanish11@gmail.com) or connect with me on [LinkedIn](https://www.linkedin.com/in/muhdhanish/).
## Contributing
Contributions are welcome!
## Support
Show your support by 🌟 the project!!