Skip to content

Commit

Permalink
Fix random jest tests which are relying on specific plugin paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeelmers committed Apr 3, 2024
1 parent 0f3fa7a commit da982d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-docs-utils/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ it('getFileName', () => {

it('test getPluginForPath', () => {
const plugins = findPlugins();
const path = Path.resolve(REPO_ROOT, 'src/plugins/embeddable/public/service/file.ts');
const path = Path.resolve(REPO_ROOT, 'src/platform/embeddable/public/service/file.ts');
expect(getPluginForPath(path, plugins)).toBeDefined();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const testMap = [
'x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/toggle_alert_flyout_button.tsx',
'xpack.synthetics',
],
['src/plugins/vis_types/gauge/public/editor/collections.ts', 'visTypeGauge'],
['src/platform/internal/vis_types/gauge/public/editor/collections.ts', 'visTypeGauge'],
['packages/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx', 'alertsUIShared'],
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ describe(`enumeratePatterns`, () => {
'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
);
});
it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => {
it(`should resolve src/platform/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => {
const actual = enumeratePatterns(REPO_ROOT)(log)(
new Map([['src/plugins/charts/common/static/color_maps', ['kibana-app']]])
new Map([['src/platform/charts/common/static/color_maps', ['kibana-app']]])
);

expect(actual.flat()).toContain(
'src/plugins/charts/common/static/color_maps/color_maps.ts kibana-app'
'src/platform/charts/common/static/color_maps/color_maps.ts kibana-app'
);
});
});

0 comments on commit da982d7

Please sign in to comment.