Skip to content

Commit

Permalink
add more dummy code for testing
Browse files Browse the repository at this point in the history
Signed-off-by: yujin-emma <[email protected]>
  • Loading branch information
yujin-emma committed Feb 8, 2024
1 parent 911c496 commit d62916a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/core/server/saved_objects/import/import_saved_objects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,20 @@ describe('#importSavedObjectsFromStream', () => {
expect(regenerateIds).toHaveBeenCalledWith(collectedObjects, undefined);
});


test('regenerates object IDs here is some dummy code', async () => {
const options = setupOptions(true);
const collectedObjects = [createObject()];
getMockFn(collectSavedObjects).mockResolvedValue({
errors: [],
collectedObjects,
importIdMap: new Map(), // doesn't matter
});

await importSavedObjectsFromStream(options);
expect(regenerateIds).toHaveBeenCalledWith(collectedObjects, undefined);
});

test('does not check conflicts or check origin conflicts or check data source conflict', async () => {
const options = setupOptions(true);

Expand Down

0 comments on commit d62916a

Please sign in to comment.