fix failing test in master (#32387)

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-01-20 17:25:33 +01:00
committed by GitHub
parent de80336fe4
commit 07eded33e6
@@ -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"`,
);
});
});