From 07eded33e6b2e1e25b70afd36e91b4607863fe00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 20 Jan 2026 17:25:33 +0100 Subject: [PATCH] fix failing test in master (#32387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../src/actions/githubPullRequest.test.ts | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.test.ts b/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.test.ts index 5a8019579b..f9679a928c 100644 --- a/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.test.ts +++ b/plugins/scaffolder-backend-module-github/src/actions/githubPullRequest.test.ts @@ -606,28 +606,13 @@ describe('createPublishGithubPullRequestAction', () => { ctx = createMockActionContext({ input, workspacePath }); }); - it('creates a pull request', async () => { - await instance.handler(ctx); - expect(fakeClient.createPullRequest).toHaveBeenCalledWith({ - owner: 'myorg', - repo: 'myrepo', - title: 'Create my new app', - head: 'new-app', - body: 'This PR is really good', - changes: [ - { - commit: 'Create my new app', - files: { - Makefile: { - content: Buffer.from('../../nothing/yet').toString('utf-8'), - encoding: 'utf-8', - mode: '120000', - }, - }, - }, - ], - }); + it('throws an error', async () => { + await expect( + instance.handler(ctx), + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Relative path is not allowed to refer to a directory outside its parent"`, + ); }); });