Skip to content

Commit 8fd0c06

Browse files
authored
fix: should get project's tsconfigPath correctly (#687)
1 parent 9fab8c0 commit 8fd0c06

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/core/rstest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default defineConfig({
55
include: ['<rootDir>/tests/**/*.test.ts'],
66
globals: true,
77
source: {
8+
tsconfigPath: './tests/tsconfig.json',
89
define: {
910
RSTEST_VERSION: JSON.stringify('0.0.0'),
1011
'process.env.GITHUB_ACTIONS': JSON.stringify('false'),

packages/core/src/core/rstest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ export class Rstest implements RstestContext {
119119
if (existsSync(tsconfigPath)) {
120120
config.source.tsconfigPath = tsconfigPath;
121121
}
122+
} else {
123+
config.source.tsconfigPath = getAbsolutePath(
124+
config.root,
125+
config.source.tsconfigPath,
126+
);
122127
}
123128
return {
124129
configFilePath: project.configFilePath,

0 commit comments

Comments
 (0)