File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/nx-infra-plugin/src/executors/babel-transform Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,25 @@ describe('BabelTransformExecutor E2E', () => {
4646 let tempDir : string ;
4747 let context = createMockContext ( ) ;
4848 let projectDir : string ;
49+ let savedCwd : string ;
4950
5051 beforeEach ( async ( ) => {
52+ savedCwd = process . cwd ( ) ;
5153 tempDir = createTempDir ( 'nx-babel-e2e-' ) ;
5254 context = createMockContext ( { root : tempDir } ) ;
5355 projectDir = path . join ( tempDir , 'packages' , 'test-lib' ) ;
5456 fs . mkdirSync ( projectDir , { recursive : true } ) ;
5557
56- const workspaceNodeModules = path . join ( WORKSPACE_ROOT , 'node_modules' ) ;
58+ const infraPluginNodeModules = path . join (
59+ WORKSPACE_ROOT ,
60+ 'packages' ,
61+ 'nx-infra-plugin' ,
62+ 'node_modules' ,
63+ ) ;
5764 const tempNodeModules = path . join ( projectDir , 'node_modules' ) ;
58- fs . symlinkSync ( workspaceNodeModules , tempNodeModules , 'junction' ) ;
65+ fs . symlinkSync ( infraPluginNodeModules , tempNodeModules , 'junction' ) ;
66+
67+ process . chdir ( projectDir ) ;
5968
6069 const buildDir = path . join ( projectDir , 'build' , 'gulp' ) ;
6170 fs . mkdirSync ( buildDir , { recursive : true } ) ;
@@ -93,6 +102,7 @@ export function helper() {
93102 } ) ;
94103
95104 afterEach ( ( ) => {
105+ process . chdir ( savedCwd ) ;
96106 cleanupTempDir ( tempDir ) ;
97107 } ) ;
98108
You can’t perform that action at this time.
0 commit comments