@@ -5,8 +5,8 @@ import { fileURLToPath } from 'node:url';
5
5
import { createRequire } from 'node:module' ;
6
6
import process from 'node:process' ;
7
7
import fs from 'fs-extra' ;
8
- import spawn from 'cross-spawn' ;
9
8
import { expect } from 'esmocha' ;
9
+ import { execaSync } from 'execa' ;
10
10
import slash from 'slash' ;
11
11
import Environment from '../lib/index.mjs' ;
12
12
import { execaOutput } from '../lib/util/util.js' ;
@@ -82,8 +82,8 @@ describe('Environment Resolver', async function () {
82
82
83
83
process . chdir ( projectRoot ) ;
84
84
if ( ! fs . existsSync ( path . join ( projectRoot , 'node_modules' ) ) ) {
85
- spawn . sync ( 'npm' , [ 'ci' ] ) ;
86
- spawn . sync ( 'npm' , [ 'install' , '-g' , 'generator-dummytest' , 'generator-dummy' , '--no-package-lock' ] ) ;
85
+ execaSync ( 'npm' , [ 'ci' ] ) ;
86
+ execaSync ( 'npm' , [ 'install' , '-g' , 'generator-dummytest' , 'generator-dummy' , '--no-package-lock' ] ) ;
87
87
}
88
88
} ) ;
89
89
@@ -173,7 +173,7 @@ describe('Environment Resolver', async function () {
173
173
describe ( "when there's ancestor node_modules/ folder" , async ( ) => {
174
174
before ( ( ) => {
175
175
process . chdir ( subDirRoot ) ;
176
- spawn . sync ( 'npm' , [ 'install' , '--no-package-lock' ] ) ;
176
+ execaSync ( 'npm' , [ 'install' , '--no-package-lock' ] ) ;
177
177
} ) ;
178
178
179
179
after ( ( ) => {
0 commit comments