* Create `createUser` method in `userCreationService` * Refactor `UserRepository` create method to accept prisma input and remove business logic * API use `UserCreationService` * Move slugify to service * Use hashPassword instead * Type fixes in `UserCreationService` * Add `userCreationService` tests * API accept data object * Type fixes * Add user _post test * Add test for locked user * Add locked param to log * Add user repository tests * Do not return locked status * Explicitly pass `locked` prop * Fix tests when locked isn't returned * Fix tests * Pass locked prop * Edit test name * Use logger * Fix passing hashed password
Unit and Integration Tests
Make sure you have copied .env.test.example to .env.test
You can run all jest tests as
yarn test
You can run tests matching specific description by following command
yarn test -t _post
Tip: Use --watchAll flag to run tests on every change