Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tkajtoch committed Dec 17, 2024
1 parent 31b9e1a commit dbf49f8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,31 @@ describe('bootstrapRenderer', () => {
uiSettingsClient,
});

expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
name: 'borealis',
darkMode: false,
});
});

it('calls getThemeTag with `v8` theme name when buildFlavor is `serverless`', async () => {
renderer = bootstrapRendererFactory({
auth,
packageInfo: {
...packageInfo,
buildFlavor: 'serverless',
},
uiPlugins,
baseHref: `/base-path/${packageInfo.buildShaShort}`, // the base href as provided by static assets module
});

const request = httpServerMock.createKibanaRequest();

await renderer({
request,
uiSettingsClient,
});

expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
name: 'v8',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ describe('getOptimizerCacheKey()', () => {
"themeTags": Array [
"v8light",
"v8dark",
"borealislight",
"borealisdark",
],
},
}
Expand Down

0 comments on commit dbf49f8

Please sign in to comment.