Skip to content

Commit d707261

Browse files
committed
Fix tests
1 parent 4c3bb2b commit d707261

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/bin/ui5.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ test.before(() => {
3434

3535
test.beforeEach(async (t) => {
3636
const sinon = t.context.sinon = sinonGlobal.createSandbox();
37+
t.context.processStdoutWriteStub = sinon.stub(process.stdout, "write");
3738
t.context.processStderrWriteStub = sinon.stub(process.stderr, "write");
3839
t.context.originalArgv = process.argv;
3940
process.env.UI5_CLI_TEST_BIN_RUN_MAIN = "false"; // prevent automatic execution of main function
@@ -148,7 +149,7 @@ test.serial("checkRequirements: logs warning when using pre-release Node.js vers
148149
});
149150

150151
test.serial("invokeLocalInstallation: Invokes local installation when found", async (t) => {
151-
const {processStderrWriteStub} = t.context;
152+
const {processStdoutWriteStub} = t.context;
152153

153154
importLocalStub.returns({});
154155

@@ -158,10 +159,10 @@ test.serial("invokeLocalInstallation: Invokes local installation when found", as
158159

159160
t.true(returnValue);
160161

161-
t.is(processStderrWriteStub.callCount, 2, "Information messages should be provided");
162+
t.is(processStdoutWriteStub.callCount, 2, "Information messages should be provided");
162163

163-
t.deepEqual(processStderrWriteStub.getCall(0).args, ["INFO: Using local ui5-cli-test installation"]);
164-
t.deepEqual(processStderrWriteStub.getCall(1).args, ["\n\n"]);
164+
t.deepEqual(processStdoutWriteStub.getCall(0).args, ["INFO: Using local ui5-cli-test installation"]);
165+
t.deepEqual(processStdoutWriteStub.getCall(1).args, ["\n\n"]);
165166

166167
t.is(importLocalStub.callCount, 1, "import-local should be called once");
167168
t.is(importLocalStub.getCall(0).args.length, 1);

0 commit comments

Comments
 (0)