Skip to content

[LOCKLITE-36] Setup unit tests environment and improve linter#29

Merged
vbetsch merged 24 commits intodevelopfrom
chore/36-tests-environment
Jul 24, 2025
Merged

[LOCKLITE-36] Setup unit tests environment and improve linter#29
vbetsch merged 24 commits intodevelopfrom
chore/36-tests-environment

Conversation

@vbetsch
Copy link
Owner

@vbetsch vbetsch commented Jul 24, 2025

No description provided.

@vbetsch vbetsch requested a review from Copilot July 24, 2025 21:03
@vbetsch vbetsch self-assigned this Jul 24, 2025
@vbetsch vbetsch added the tests About tests configuration, suites or tests label Jul 24, 2025
@notion-workspace
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vbetsch merged commit 3d10611 into develop Jul 24, 2025
1 check passed
@vbetsch vbetsch deleted the chore/36-tests-environment branch July 24, 2025 21:24
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests About tests configuration, suites or tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants