File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/solutions/app-tools/tests/utils Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ describe('ts-node-loader', () => {
1010 const appDir = path . join ( rootDir , 'app' ) ;
1111 const serviceDir = path . join ( rootDir , 'service' ) ;
1212 const serviceFile = path . join ( serviceDir , 'user.ts' ) ;
13+ const tsconfigPath = path . join ( rootDir , 'tsconfig.json' ) ;
1314 const loaderPath = path . resolve (
1415 __dirname ,
1516 '../../src/esm/ts-node-loader.mjs' ,
@@ -18,6 +19,17 @@ describe('ts-node-loader', () => {
1819 fs . mkdirSync ( appDir , { recursive : true } ) ;
1920 fs . mkdirSync ( serviceDir , { recursive : true } ) ;
2021 fs . writeFileSync ( serviceFile , 'export const user = 1;\n' ) ;
22+ // Keep ts-node isolated from workspace-level tsconfig files in CI.
23+ fs . writeFileSync (
24+ tsconfigPath ,
25+ JSON . stringify ( {
26+ compilerOptions : {
27+ target : 'ES2020' ,
28+ module : 'NodeNext' ,
29+ moduleResolution : 'NodeNext' ,
30+ } ,
31+ } ) ,
32+ ) ;
2133
2234 try {
2335 const output = childProcess . execFileSync (
@@ -55,8 +67,12 @@ describe('ts-node-loader', () => {
5567 ` ,
5668 ] ,
5769 {
58- cwd : process . cwd ( ) ,
70+ cwd : rootDir ,
5971 encoding : 'utf8' ,
72+ env : {
73+ ...process . env ,
74+ TS_NODE_PROJECT : tsconfigPath ,
75+ } ,
6076 } ,
6177 ) ;
6278
You can’t perform that action at this time.
0 commit comments