Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianomonteiroweb/solid-testable-api-architecture
Repository of architectural studies of a testable api with SOLID concepts in classes and TypeScript.
https://github.com/adrianomonteiroweb/solid-testable-api-architecture
api nodejs solid typescript unit-testing vitest
Last synced: 19 days ago
JSON representation
Repository of architectural studies of a testable api with SOLID concepts in classes and TypeScript.
- Host: GitHub
- URL: https://github.com/adrianomonteiroweb/solid-testable-api-architecture
- Owner: adrianomonteiroweb
- Created: 2022-09-17T14:46:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-18T00:36:45.000Z (over 2 years ago)
- Last Synced: 2024-11-21T15:44:35.361Z (3 months ago)
- Topics: api, nodejs, solid, typescript, unit-testing, vitest
- Language: TypeScript
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SOLID TESTABLE API ARCHITECTURE
Repository of architectural studies of a testable api with SOLID concepts in classes and TypeScript.
### TECHNOLOGIES
- DevDependencies:
- Eslint Standard;
- To standardize formatting during development.
- Vitest;
- Test module compatible with jest, typescript and others...
- date-fns.
- Used for handling dates in a function to generate future dates.### ENTITIES
```bash
...
├── src
├── entities
...
├── Appointment.ts
...
├── repositories
├── tests
├── use-cases
...
```- Appointment:
- customer;
- startAt;
- endAt.### USE CASES
```bash
...
├── src
├── entities
├── repositories
├── tests
├── use-cases
...
├── create-appointment.ts
...
...
```- create-appointment:
- CreateAppointment.### REPOSITORIES
```bash
...
├── src
├── entities
├── repositories
├── in-memory
├── appointment-repository.ts
├── tests
├── use-cases
...
```- appointment-repository.
### TESTING THE APPLICATION
- Functions
- get-future-date
- Increases date with one year.```bash
...
├── src
├── entities
├── repositories
├── tests
├── utils
...
├── get-future-date.ts
...
├── use-cases
...
```- For application test, running:
```zsh
npm test
``````bash
...
├── src
├── entities
...
├── appointment.spec.ts
...
├── repositories
├── tests
├── utils
...
├── get-future-date.spec.ts
...
├── use-cases
...
├── create-appointment.spec.ts
...
...
```### REFERENCE