-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: setup all examples and ci #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
- Add GitHub Actions workflow with matrix strategy - Test all 6 examples (inversify-jest, inversify-sinon, inversify-vitest, nestjs-jest, nestjs-sinon, nestjs-vitest) - Test on Node.js 16, 18, 20, and 22 - Include two-level caching for faster subsequent runs - Add example READMEs and configurations
- Add type: module to Vitest examples for proper ESM support - Configure Vitest examples to use ESNext module and bundler resolution - Add vitest/globals types to Vitest tsconfig for IDE support - Add jest types to Jest examples tsconfig for IDE support - Update Vitest SWC plugin to use es6 module type - Remove package.json.bak file
- Use lowercase esnext for target and module - Use node module resolution for better compatibility - Adjust import order in test file
- Run tsc --noEmit before tests in all examples - Ensures TypeScript errors are caught in CI - Provides consistency across all test runners
- Remove type-only import for Mocked - Use node module resolution for compatibility - Add type annotation to user parameter - Standardize import order
- Change from 'UserService - Solitary Tests' to 'User Service Unit Spec (Solitary Tests)' - Change from 'UserService - Sociable Tests' to 'User Service Unit Spec (Sociable Tests)' - Apply across all 6 examples for consistency
- Change unitRef.get(DATABASE_TOKEN) to unitRef.get<Database>(DATABASE_TOKEN) - Improves type safety and consistency across all examples - Follows the pattern from inversify-sinon example
7f3d803 to
36e7e2c
Compare
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.