Skip to content

Commit

Permalink
fix failed UT
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 14, 2024
1 parent 3a583db commit 3385b14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ describe('#checkConflictsForDataSource', () => {
filteredObjects: [],
errors: [],
importIdMap: new Map(),
pendingOverwrites: new Set(),
});
});

Expand All @@ -83,7 +82,6 @@ describe('#checkConflictsForDataSource', () => {
filteredObjects: [dataSourceObj1, dataSourceObj2],
errors: [],
importIdMap: new Map(),
pendingOverwrites: new Set(),
});
});

Expand Down Expand Up @@ -118,10 +116,6 @@ describe('#checkConflictsForDataSource', () => {
{ id: 'currentDsId_id-2', omitOriginId: true },
],
]),
pendingOverwrites: new Set([
`${dataSourceObj1.type}:${dataSourceObj1.id}`,
`${dataSourceObj2.type}:${dataSourceObj2.id}`,
]),
})
);
});
Expand All @@ -144,7 +138,6 @@ describe('#checkConflictsForDataSource', () => {
},
],
importIdMap: new Map(),
pendingOverwrites: new Set(),
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ describe('#importSavedObjectsFromStream', () => {
collectedObjects,
importIdMap: new Map(),
});
getMockFn(checkConflicts).mockResolvedValue({
errors: [],
filteredObjects: collectedObjects,
importIdMap: new Map([['bar', { id: 'newId1' }]]),
pendingOverwrites: new Set(),
});

await importSavedObjectsFromStream(options);
const checkConflictsForDataSourceParams = {
Expand Down

0 comments on commit 3385b14

Please sign in to comment.