Skip to content

Commit

Permalink
Add tests for enforcement flag
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Nov 14, 2023
1 parent 67d083b commit 2e8d09c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/lib/build/ProjectBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,14 @@ test("_executeCleanupTasks", async (t) => {
t.is(executeCleanupTasksStub.callCount, 1, "BuildContext#executeCleanupTasks got called once");
t.deepEqual(executeCleanupTasksStub.getCall(0).args, [undefined],
"BuildContext#executeCleanupTasks got called with no 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");
});

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

0 comments on commit 2e8d09c

Please sign in to comment.