We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8d6b75 commit dac4edaCopy full SHA for dac4eda
jest/helpers.ts
@@ -132,8 +132,14 @@ function getExecaOptions(options: SpawnOptions) {
132
133
const cwd = isRelative ? path.resolve(__dirname, options.cwd) : options.cwd;
134
135
+ const localBin = path.resolve(cwd, 'node_modules/.bin');
136
+
137
+ // Merge the existing environment with the new one
138
let env = Object.assign({}, process.env, {FORCE_COLOR: '0'}, options.env);
139
140
+ // Prepend the local node_modules/.bin to the PATH
141
+ env.PATH = `${localBin}${path.delimiter}${env.PATH}`;
142
143
if (options.nodeOptions) {
144
env.NODE_OPTIONS = options.nodeOptions;
145
}
0 commit comments