Skip to content

Commit

Permalink
test: add case for resolving paths from an extended tsconfig (#166)
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Larson <[email protected]>
  • Loading branch information
jdharrisnz and aleclarson authored Dec 6, 2024
1 parent 2d187b9 commit 34cb651
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/__fixtures__/extends-paths/case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The focal point of this case is to ensure that the `paths` are resolved correctly when a project extends another project that has `paths` defined in its `compilerOptions`.
3 changes: 3 additions & 0 deletions test/__fixtures__/extends-paths/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"root": "./my-app"
}
3 changes: 3 additions & 0 deletions test/__fixtures__/extends-paths/my-app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { message } from '@/message'

console.log(message)
1 change: 1 addition & 0 deletions test/__fixtures__/extends-paths/my-app/message.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const message = 'Hello world'
4 changes: 4 additions & 0 deletions test/__fixtures__/extends-paths/my-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["./"]
}
12 changes: 12 additions & 0 deletions test/__fixtures__/extends-paths/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "bundler",
"skipLibCheck": true,
"paths": {
"@/*": ["./my-app/*"]
}
},
"include": [],
"references": [{ "path": "./my-app/" }]
}

0 comments on commit 34cb651

Please sign in to comment.