Skip to content

Commit e789020

Browse files
committed
Fix types in test
1 parent ccdf919 commit e789020

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

x-pack/plugins/lens/server/migrations.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
*/
66

77
import { migrations, RawLensSavedXYObject770 } from './migrations';
8-
import { SimpleSavedObject } from 'src/core/public';
8+
import { SavedObjectUnsanitizedDoc } from 'src/core/server';
99

1010
describe('Lens migrations', () => {
1111
describe('7.7.0 missing dimensions in XY', () => {
12-
const migrate = (doc: SimpleSavedObject | RawLensSavedXYObject770) => migrations['7.7.0'](doc);
12+
const migrate = (doc: SavedObjectUnsanitizedDoc | RawLensSavedXYObject770) =>
13+
migrations['7.7.0'](doc);
1314

1415
const example: RawLensSavedXYObject770 = {
1516
type: 'lens',
@@ -106,7 +107,7 @@ describe('Lens migrations', () => {
106107
visualizationType: 'lnsMetric',
107108
},
108109
};
109-
const result = migrate(target as SimpleSavedObject);
110+
const result = migrate(target as SavedObjectUnsanitizedDoc);
110111
expect(result).toEqual(target);
111112
});
112113

@@ -124,7 +125,7 @@ describe('Lens migrations', () => {
124125
},
125126
},
126127
},
127-
} as SimpleSavedObject) as RawLensSavedXYObject770;
128+
} as SavedObjectUnsanitizedDoc) as RawLensSavedXYObject770;
128129

129130
expect(result.attributes.state.visualization.layers).toEqual([
130131
{

0 commit comments

Comments
 (0)