Code Monkey home page Code Monkey logo

node_solid_vitest's Introduction

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

  1. Clone the repository.
  2. Run npm install to install dependencies.
  3. 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 [email protected] or connect with me on LinkedIn.

Contributing

Contributions are welcome!

Support

Show your support by 🌟 the project!!

node_solid_vitest's People

Contributors

muhdhanish avatar

Stargazers

Mohammed Unais EK avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.