Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 2b37360

Browse files
test: resolve js to ts in aliased path (#35)
1 parent cb995c1 commit 2b37360

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import value from 'p/nested-resolve-target.js';
2+
3+
console.log(value);

tests/specs/typescript/tsconfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
5050
expect(nodeProcess.stdout).toBe('nested-resolve-target');
5151
});
5252

53+
test('resolves paths via .js', async () => {
54+
const nodeProcess = await node.load('./src/paths-prefix-match-js.ts', {
55+
cwd: './tsconfig',
56+
});
57+
expect(nodeProcess.stdout).toBe('nested-resolve-target');
58+
});
59+
5360
describe('dependency', ({ test }) => {
5461
test('resolve current directory', async () => {
5562
const nodeProcess = await node.load('./dependency-resolve-current-directory', {

0 commit comments

Comments
 (0)