Skip to content

Commit

Permalink
Add mock for getUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba committed Aug 30, 2021
1 parent 95fbf7a commit 3058daf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const shareMock = sharePluginMock.createSetupContract();
shareMock.url.locators.get = (id) => ({
// @ts-expect-error This object is missing some properties that we're not using in the UI
useUrl: (): string | undefined => idToUrlMap[id],
// @ts-expect-error This object is missing some properties that we're not using in the UI
getUrl: (): string | undefined => idToUrlMap[id],
});

export const getAppContextMock = (mockHttpClient: HttpSetup) => ({
Expand Down

0 comments on commit 3058daf

Please sign in to comment.