[LOCKLITE-36] Setup unit tests environment and improve linter#29
Merged
[LOCKLITE-36] Setup unit tests environment and improve linter#29
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR sets up a comprehensive unit testing environment and improves the TypeScript linting configuration for the project. The changes focus on introducing Jest for testing and enforcing consistent type imports across the codebase.
- Adds Jest testing framework with TypeScript support and path mapping configuration
- Implements type-only imports for better tree-shaking and linting consistency
- Creates the first unit test for the GetAllUsersUseCase with comprehensive test scenarios
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/units/modules/api/usecases/users/get-all-users.test.ts | New unit test file for GetAllUsersUseCase with three test scenarios |
| Multiple .tsx and .ts files | Updated imports to use type keyword for type-only imports |
| package.json | Added Jest and testing-related dependencies, plus test script |
| jest.config.ts | New Jest configuration with TypeScript support and path mapping |
| eslint.config.mjs | Enhanced ESLint config with Jest support and consistent-type-imports rule |
| Makefile | Added tests target for running unit tests |
Files not reviewed (1)
- .idea/locklite.iml: Language not supported
vbetsch
added a commit
that referenced
this pull request
Jul 28, 2025
* feat: Add units tests architecture * chore(deps): Add jest dependencies * chore(linter): Add jest into eslint * chore(linter): Add eslint-plugin-no-comments * chore(linter): Add no-comments/disallowComments * chore(linter): Fix jest * chore(linter): Fix eslintPluginNoComments * chore(linter): Set no-comments on warn * chore(linter): Remove eslint-plugin-no-comments * chore(linter): Add @typescript-eslint/consistent-type-imports * fix(linter): Fix import types * chore(tests): Add jest config * chore(tests): Add test command * chore(deps): Add ts-node dependency * chore(tests): Fix jest config * revert(deps): Remove ts-node dependency * chore(ide): Identify tests folder * chore(ide): Exclude lib folder * chore(tests): Add ts aliases in jest config * test: Create tests for GetAllUsersUseCase * test: Create tests for UsersList * chore(tests): Create a setup file for UI * chore(tests): Create tsconfig.jest.json * test: Fix users-list.test.tsx
vbetsch
added a commit
that referenced
this pull request
Jul 28, 2025
* feat: Add units tests architecture * chore(deps): Add jest dependencies * chore(linter): Add jest into eslint * chore(linter): Add eslint-plugin-no-comments * chore(linter): Add no-comments/disallowComments * chore(linter): Fix jest * chore(linter): Fix eslintPluginNoComments * chore(linter): Set no-comments on warn * chore(linter): Remove eslint-plugin-no-comments * chore(linter): Add @typescript-eslint/consistent-type-imports * fix(linter): Fix import types * chore(tests): Add jest config * chore(tests): Add test command * chore(deps): Add ts-node dependency * chore(tests): Fix jest config * revert(deps): Remove ts-node dependency * chore(ide): Identify tests folder * chore(ide): Exclude lib folder * chore(tests): Add ts aliases in jest config * test: Create tests for GetAllUsersUseCase * test: Create tests for UsersList * chore(tests): Create a setup file for UI * chore(tests): Create tsconfig.jest.json * test: Fix users-list.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.