Skip to content

Commit

Permalink
[INTERNAL] All stubs are now restored using sinon.restore()
Browse files Browse the repository at this point in the history
  • Loading branch information
romaniam committed Jan 8, 2019
1 parent 45f0b1e commit 5957e91
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/lib/cli/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const builder = require("@ui5/builder").builder;
const logger = require("@ui5/logger");
let normalizerStub = null;
let builderStub = null;
let loggerStub = null;

const args = {
_: [],
Expand All @@ -33,13 +32,11 @@ const defaultBuilderArgs = {
test.beforeEach("Mocking before test execution", (t) => {
normalizerStub = sinon.stub(normalizer, "generateProjectTree");
builderStub = sinon.stub(builder, "build").returns(Promise.resolve());
loggerStub = sinon.stub(logger, "setShowProgress");
sinon.stub(logger, "setShowProgress");
});

test.afterEach("Restore mocks after test exection", (t) => {
loggerStub.restore();
builderStub.restore();
normalizerStub.restore();
sinon.restore();
});

test.serial("ui5 build (default) ", async (t) => {
Expand Down

0 comments on commit 5957e91

Please sign in to comment.