Files
f5d3979771 Add comprehensive tests for tsconfig extends functionality (#660)
This PR adds comprehensive test coverage for the `extend_tsconfig`
method in `src/tsconfig.rs` which handles inheritance of TypeScript
configuration settings when using the `extends` field.

The new test suite includes:

- **Base URL inheritance**: Tests that `baseUrl` is properly inherited
from parent configs
- **Paths inheritance**: Validates that path aliases are inherited and
resolved correctly
- **Override behavior**: Ensures child configurations override parent
values when present
- **JSX options**: Tests inheritance of JSX-related compiler options
- **Template variables**: Validates `${configDir}` template variable
handling with extends
- **Multiple inheritance chains**: Tests inheritance through multiple
levels of extends
- **Child setting preservation**: Ensures existing child settings are
not overridden
- **Direct method testing**: Unit tests for the `extend_tsconfig` method
logic

All tests include corresponding fixture files that mirror real-world
TypeScript configuration scenarios. This ensures the resolver correctly
handles complex tsconfig inheritance patterns used in modern TypeScript
projects.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/oxc-project/oxc-resolver/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: Boshen <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2025-08-24 22:51:20 +08:00

6 lines
90 B
JSON

{
"extends": "./base-tsconfig.json",
"compilerOptions": {
"target": "ES2022"
}
}