feat: add separate tsconfig for test files#4616
feat: add separate tsconfig for test files#4616devnchill wants to merge 4 commits intoOWASP:mainfrom
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughA TypeScript test configuration file was added at ChangesTest Configuration Setup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/__tests__/tsconfig.json`:
- Around line 4-8: Remove the "@testing-library/jest-dom" entry from the
tsconfig "types" array because it causes TS2688 with v6+; instead rely on the
import in jest.setup.ts (configured via setupFilesAfterEnv) which already
provides the globals, so edit the "types" array to omit
"@testing-library/jest-dom" and keep "jest" and "node" intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b0529400-fc0b-489b-b564-5cc6f7b34469
📒 Files selected for processing (1)
frontend/__tests__/tsconfig.json
|
@arkid15r , at the moment the "test:a11y": "NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' jest __tests__/a11y/ --coverage=false",
"test:unit": "tsc --noEmit && NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' jest"however i was wondering that since |
…excluded in parent tsconfig.json
|



Proposed change
Resolves #4571
Add the PR description here.
tsconfiginfrontend/tsconfig.jsonexcludestestdirectory. this causes for lsp unable to pick up any globals/methods from jest libraries . This pr adds a separatetsconfig.jsoninfrontend/__tests__.Checklist
make check-testlocally: all warnings addressed, tests passed