-
-
Notifications
You must be signed in to change notification settings - Fork 162
test: add full test typecheck config #171
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
Conversation
commit: |
WalkthroughThis change introduces TypeScript type checking specifically for test files. A new TypeScript configuration file (tsconfig.tests.json) is added that extends the base configuration, enables the noEmit flag, and targets test files whilst excluding generated and plugin-related source files. Two npm scripts are added to package.json to enable running type checks: one that validates test files specifically, and another that runs both the existing type check script and the new test type check script sequentially. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
package.json (1)
31-31: Remove redundant--noEmitflag.The
--noEmitflag is redundant sincetsconfig.tests.jsonalready specifies"noEmit": truein its compiler options.♻️ Proposed refactor
- "typecheck:tests": "npx tsc -p tsconfig.tests.json --noEmit", + "typecheck:tests": "npx tsc -p tsconfig.tests.json",
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
package.jsontsconfig.tests.json
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript file extensions (.ts) for all relative imports to ensure compatibility with native TypeScript runtimes
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use .js extensions only for external package imports (e.g., modelcontextprotocol/sdk/server/mcp.js)
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Import core logic functions from tool files and pass mock executors to simulate different test outcomes
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Enforce strict Dependency Injection (DI) testing philosophy - completely ban the use of Vitest mocking utilities (vi.mock(), vi.fn(), vi.spyOn(), etc.)
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Use injectable executors (CommandExecutor and FileSystemExecutor) for all external interactions instead of mocking
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Never use .js extensions for internal file imports; always use .ts extensions
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to src/tools/**/*.ts : Organize tools into directories by their functionality and use automatic loading via plugin-based MCP architecture
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript file extensions (.ts) for all relative imports to ensure compatibility with native TypeScript runtimes
Applied to files:
tsconfig.tests.jsonpackage.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Enforce strict Dependency Injection (DI) testing philosophy - completely ban the use of Vitest mocking utilities (vi.mock(), vi.fn(), vi.spyOn(), etc.)
Applied to files:
tsconfig.tests.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use .js extensions only for external package imports (e.g., modelcontextprotocol/sdk/server/mcp.js)
Applied to files:
tsconfig.tests.jsonpackage.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Import core logic functions from tool files and pass mock executors to simulate different test outcomes
Applied to files:
tsconfig.tests.jsonpackage.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to src/tools/**/*.ts : Organize tools into directories by their functionality and use automatic loading via plugin-based MCP architecture
Applied to files:
package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Seer Code Review
- GitHub Check: Cursor Bugbot
🔇 Additional comments (3)
package.json (1)
32-32: LGTM!The script correctly chains both type checks sequentially using
&&, ensuring fail-fast behaviour if either check fails.tsconfig.tests.json (2)
7-13: LGTM!The include patterns correctly target test files in both
srcandtests-vitestdirectories, whilst the exclude patterns appropriately filter out generated files, plugins, and node_modules.
5-5: The basetsconfig.jsondoes not specify atypesarray. Since there are no inherited types to override, the test configuration's explicittypesdeclaration is valid and necessary for proper type resolution in the test environment.Likely an incorrect or invalid review comment.
Summary
Testing
Note
Introduces TypeScript typechecking for tests.
tsconfig.tests.jsonto typecheck Vitest tests (includesvitest/globalstypes)typecheck:testsandtypecheck:allnpm scripts inpackage.jsonWritten by Cursor Bugbot for commit 65a99c9. This will update automatically on new commits. Configure here.