Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
virgilchiriac committed Jan 23, 2025
1 parent d10659a commit e8ab582
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe(DeletionExecutionConsole.name, () => {
const setup = () => {
const limit = 1000;

const options = TriggerDeletionExecutionOptionsBuilder.build(1000);
const options = TriggerDeletionExecutionOptionsBuilder.build(1000, false);

return { limit, options };
};
Expand All @@ -50,13 +50,13 @@ describe(DeletionExecutionConsole.name, () => {

await console.triggerDeletionExecution(options);

expect(spy).toBeCalledWith(limit);
expect(spy).toBeCalledWith(limit, false);
});
});

describe(`when ${DeletionExecutionUc.name}'s triggerDeletionExecution() method doesn't throw an exception`, () => {
const setup = () => {
const options = TriggerDeletionExecutionOptionsBuilder.build(1000);
const options = TriggerDeletionExecutionOptionsBuilder.build(1000, false);

deletionExecutionUc.triggerDeletionExecution.mockResolvedValueOnce(undefined);
const spy = jest.spyOn(DeletionExecutionTriggerResultBuilder, 'buildSuccess');
Expand All @@ -75,7 +75,7 @@ describe(DeletionExecutionConsole.name, () => {

describe(`when ${DeletionExecutionUc.name}'s triggerDeletionExecution() method throws an exception`, () => {
const setup = () => {
const options = TriggerDeletionExecutionOptionsBuilder.build(1000);
const options = TriggerDeletionExecutionOptionsBuilder.build(1000, false);
const err = new Error('some error occurred...');

deletionExecutionUc.triggerDeletionExecution.mockRejectedValueOnce(err);
Expand Down

0 comments on commit e8ab582

Please sign in to comment.