Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

NestJS #12

Closed
8 of 11 tasks
eddiejaoude opened this issue Jan 26, 2021 · 7 comments
Closed
8 of 11 tasks

NestJS #12

eddiejaoude opened this issue Jan 26, 2021 · 7 comments
Assignees

Comments

@eddiejaoude
Copy link
Member

eddiejaoude commented Jan 26, 2021

  • Create NestJS api project from CLI
  • Add GitHub Action for lint, prettier, build
  • Use NestJS CLI to create a new CRUD resource called discord with the generate command resource docs
  • Automated testing end-to-end with what NestJS recommend (remove unit testing)
  • Wrap automated testing in Cucumber
  • GitHub Action for automated testing
  • Create CRUD for member without DB
interface Member {
   username: string;
   bio: string;
   socials: {
      discord: string;
      twitter: string;
      linkedin: string;
      github: string;
   };
   updatedOn: Date;
   createdOn: Date;
}
  • Add Mongo DB for CRUD with typeorm docs
  • Add Swagger docs (there is a NestJS plugin)
  • Dockerise
  • Deploy to Digital Ocean

Notes for the future

  • Discord (username, total messages, total reactions, bio, social links)
  • GitHub (username, total commits, total replies, total issues, total PRs, total reactions)
@khattakdev
Copy link
Member

@eddiejaoude Do we need Prettier as well in GitHub actions? We can make it run and format the files before every user commits and just add linting and build Action. What do you think?

Also, if we have prettier in GitHub Action, we will have to do one additional commit via GitHub Action right? When it format the files?

@eddiejaoude
Copy link
Member Author

@khattakdev I would rather the Action does not change any files 👍 so leave Prettier off the Action.

We could always add something like Husky later to run things locally before people commit.

@BOLT04
Copy link
Member

BOLT04 commented Feb 12, 2021

Automated testing end-to-end with what NestJS recommend (remove unit testing)

I agree having automated e2e tests is beneficial, but I'd like to know the reason behind removing unit tests in favor or e2e?
Can't we have both 😃?

@andrew-cunliffe
Copy link

Ahhh e2e vs unit testing, I have a video coming up about this subject, there is a place for both for sure but there are several considerations to be had

@eddiejaoude
Copy link
Member Author

Yes ideally we should (and can) have both 👍 . Unit testing definitely has the benefit of being able to test boundary conditions within the depths of the code. But I often seen when unit tests pass, but the product still does not work.

A good example is https://twitter.com/ThePracticalDev/status/687672086152753152

I think for now we should prioritise e2e tests, as the API is blocking a lot of other projects.

@eddiejaoude
Copy link
Member Author

eddiejaoude commented Feb 13, 2021

I think for the e2e testing on the API, we should use

  • chai / jest
  • supertest
  • cucumber

@eddiejaoude
Copy link
Member Author

I will close this as we have more specific issues for remaining tasks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants