diff --git a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts index b94dddf8f7..fb1a8b6919 100644 --- a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts +++ b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts @@ -70,7 +70,9 @@ describe('useGetHubBatchInfo', () => { }); it('should handle repositories without any releases', async () => { - (mockApiClient.getLatestRelease as jest.Mock).mockResolvedValueOnce(null); + (mockApiClient.getLatestRelease as jest.Mock).mockResolvedValueOnce({ + latestRelease: null, + }); const { result } = renderHook(() => useGetGitBatchInfo({ @@ -85,8 +87,16 @@ describe('useGetHubBatchInfo', () => { expect(result.current.gitBatchInfo).toMatchInlineSnapshot(` Object { - "error": [TypeError: Cannot read property 'latestRelease' of null], "loading": false, + "value": Object { + "latestRelease": null, + "releaseBranch": null, + "repository": Object { + "defaultBranch": "mock_defaultBranch", + "name": "mock_repo", + "pushPermissions": true, + }, + }, } `); });