Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Feb 20, 2024
1 parent 102c6f8 commit 344e1c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('getCommonStylesheetPaths', () => {
})
).toMatchInlineSnapshot(`
Array [
"/base-path/17/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css",
"/base-path/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css",
"/base-path/ui/legacy_styles.css",
]
`);
Expand All @@ -64,10 +64,7 @@ describe('getStylesheetPaths', () => {
})
).toMatchInlineSnapshot(`
Array [
"/base-path/17/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.dark.css",
"/base-path/ui/legacy_dark_theme.min.css",
"/base-path/buildShaShort/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.dark.css",
"/base-path/buildShaShort/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css",
"/base-path/buildShaShort/ui/legacy_dark_theme.min.css",
]
`);
Expand All @@ -85,8 +82,8 @@ describe('getStylesheetPaths', () => {
})
).toMatchInlineSnapshot(`
Array [
"/base-path/69/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css",
"/base-path/ui/legacy_light_theme.min.css",
"/base-path/buildShaShort/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css",
"/base-path/buildShaShort/ui/legacy_light_theme.min.css",
]
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ function renderTestCases(
expect(getCommonStylesheetPathsMock).toHaveBeenCalledTimes(1);
expect(getCommonStylesheetPathsMock).toHaveBeenCalledWith({
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -202,7 +201,6 @@ function renderTestCases(
expect(getScriptPathsMock).toHaveBeenCalledWith({
darkMode: true,
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -222,13 +220,11 @@ function renderTestCases(
darkMode: true,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
expect(getThemeStylesheetPathsMock).toHaveBeenCalledWith({
darkMode: false,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand Down Expand Up @@ -312,7 +308,6 @@ function renderDarkModeTestCases(
darkMode: true,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -338,7 +333,6 @@ function renderDarkModeTestCases(
darkMode: false,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -362,7 +356,6 @@ function renderDarkModeTestCases(
darkMode: false,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -386,7 +379,6 @@ function renderDarkModeTestCases(
darkMode: true,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -410,7 +402,6 @@ function renderDarkModeTestCases(
darkMode: false,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -434,7 +425,6 @@ function renderDarkModeTestCases(
darkMode: false,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});

Expand All @@ -458,7 +448,6 @@ function renderDarkModeTestCases(
darkMode: true,
themeVersion: 'v8',
baseHref: '/mock-server-basepath',
buildNum: expect.any(Number),
});
});
});
Expand All @@ -485,6 +474,7 @@ describe('RenderingService', () => {
getCommonStylesheetPathsMock.mockReturnValue(['/common-1.css']);
getThemeStylesheetPathsMock.mockReturnValue(['/style-1.css', '/style-2.css']);
getScriptPathsMock.mockReturnValue(['/script-1.js']);
getBrowserLoggingConfigMock.mockReset().mockReturnValue({});
});

describe('preboot()', () => {
Expand Down

0 comments on commit 344e1c0

Please sign in to comment.