aiillssa / Husky-Hustler-Backend

Backend for husky hustler. Here is the frontend: https://github.com/aiillssa/Husky-Hustlers-Frontend
1 stars 0 forks source link

Testing Bug: Tests allowing incorrectly formatted data to be added #6

Open aiillssa opened 3 weeks ago

aiillssa commented 3 weeks ago
  1. Make sure to initialize the AppDataSource like AppDataSource.initialize() before running tests within the it chunk
  2. Since we have validators/middleware, you can't just call the method to test! We have to call the validator, and then pass in whatever method as the nextFunction: createUserValidator(s,s2,() => createUser(s,s2));