We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31a440 commit 67ceb9cCopy full SHA for 67ceb9c
tests/utils/fixture.ts
@@ -199,6 +199,11 @@ export async function runPluginStep(
199
step: 'onPreBuild' | 'onBuild' | 'onPostBuild' | 'onEnd',
200
constants: Partial<NetlifyPluginConstants> = {},
201
) {
202
+ // `invokeFunction` also does cwd mocking (to function directory in that case),
203
+ // so in case `runPluginStep` is executed after `invokeFunction`,
204
+ // we ensure the cwd is set to fixture root again
205
+ vi.spyOn(process, 'cwd').mockReturnValue(ctx.cwd)
206
+
207
const stepFunction = (await import('../../src/index.js'))[step]
208
209
let netlifyConfig = {
0 commit comments