Skip to content

Commit

Permalink
[INTERNAL] Default force flag to 'false'
Browse files Browse the repository at this point in the history
Update JSDoc
  • Loading branch information
RandomByte committed Nov 14, 2023
1 parent 61cec42 commit 4a1ece4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/build/helpers/BuildContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class BuildContext {
return projectBuildContext;
}

async executeCleanupTasks(force) {
async executeCleanupTasks(force = false) {
await Promise.all(this._projectBuildContexts.map((ctx) => {
return ctx.executeCleanupTasks(force);
}));
Expand Down
4 changes: 2 additions & 2 deletions lib/build/helpers/TaskUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class TaskUtil {
* @public
* @callback @ui5/project/build/helpers/TaskUtil~cleanupTaskCallback
* @param {boolean} force Specifies whether the cleanup callback should
* gracefully wait for certain jobs to be completed
* or enforce immediate termination and cleanup of those jobs.
* gracefully wait for certain jobs to be completed (<code>false</code>)
* or enforce immediate termination (<code>true</code>).
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions test/lib/build/ProjectBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,15 @@ test("_executeCleanupTasks", async (t) => {
await builder._executeCleanupTasks();
t.is(executeCleanupTasksStub.callCount, 1, "BuildContext#executeCleanupTasks got called once");
t.deepEqual(executeCleanupTasksStub.getCall(0).args, [undefined],
"BuildContext#executeCleanupTasks got called with no arguments");
"BuildContext#executeCleanupTasks got called with correct arguments");

// reset stub
executeCleanupTasksStub.reset();
// Call with enforcement flag
await builder._executeCleanupTasks(true);
t.is(executeCleanupTasksStub.callCount, 1, "BuildContext#executeCleanupTasks got called once");
t.deepEqual(executeCleanupTasksStub.getCall(0).args, [true],
"BuildContext#executeCleanupTasks got called with force flag");
"BuildContext#executeCleanupTasks got called with correct arguments");
});

test("instantiate new logger for every ProjectBuilder", async (t) => {
Expand Down

0 comments on commit 4a1ece4

Please sign in to comment.