Skip to content

Commit

Permalink
fixing types
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Jul 7, 2021
1 parent 47ae051 commit 984c57e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,12 @@ describe('dashboard', () => {

it('runs migrations on by value panels only', () => {
const newEmbeddableSetupMock = createEmbeddableSetupMock();
newEmbeddableSetupMock.getAllMigrations.mockImplementation(
() =>
({
'7.13.0': (state: SerializableState) => {
state.superCoolKey = 'ONLY 4 BY VALUE EMBEDDABLES THANK YOU VERY MUCH';
return state;
},
} as any)
);
newEmbeddableSetupMock.getAllMigrations.mockImplementation(() => ({
'7.13.0': (state: SerializableState) => {
state.superCoolKey = 'ONLY 4 BY VALUE EMBEDDABLES THANK YOU VERY MUCH';
return state;
},
}));
const migrationsList = createDashboardSavedObjectTypeMigrations({
embeddable: newEmbeddableSetupMock,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ export interface DashboardSavedObjectTypeMigrationsDeps {
export const createDashboardSavedObjectTypeMigrations = (
deps: DashboardSavedObjectTypeMigrationsDeps
): SavedObjectMigrationMap => {
const embeddableMigrations = (mapValues(
const embeddableMigrations = mapValues<MigrateFunctionsObject, SavedObjectMigrationFn>(
deps.embeddable.getAllMigrations(),
migrateByValuePanels
) as any) as MigrateFunctionsObject;
) as MigrateFunctionsObject;

const dashboardMigrations = {
/**
Expand Down

0 comments on commit 984c57e

Please sign in to comment.