Skip to content

Commit 4c4ef79

Browse files
committed
fix: add type casts for runSilent results in test to satisfy test tsconfig
1 parent b1c9aa1 commit 4c4ef79

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/b2c-cli/test/commands/job/log.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('job log', () => {
4040
const getJobLogStub = sinon.stub().resolves('log content here');
4141
command.operations = {...command.operations, getJobExecution: getJobExecutionStub, getJobLog: getJobLogStub};
4242

43-
const result = await runSilent(() => command.run());
43+
const result = (await runSilent(() => command.run())) as {execution: unknown; log: string};
4444

4545
expect(getJobExecutionStub.calledOnce).to.equal(true);
4646
expect(getJobExecutionStub.getCall(0).args[0]).to.equal(instance);
@@ -62,7 +62,7 @@ describe('job log', () => {
6262
const getJobLogStub = sinon.stub().resolves('log from exec-2');
6363
command.operations = {...command.operations, searchJobExecutions: searchStub, getJobLog: getJobLogStub};
6464

65-
const result = await runSilent(() => command.run());
65+
const result = (await runSilent(() => command.run())) as {log: string};
6666

6767
expect(searchStub.calledOnce).to.equal(true);
6868
expect(searchStub.getCall(0).args[0]).to.equal(instance);
@@ -82,7 +82,7 @@ describe('job log', () => {
8282
const getJobLogStub = sinon.stub().resolves('error log');
8383
command.operations = {...command.operations, searchJobExecutions: searchStub, getJobLog: getJobLogStub};
8484

85-
const result = await runSilent(() => command.run());
85+
const result = (await runSilent(() => command.run())) as {log: string};
8686

8787
expect(searchStub.getCall(0).args[1]).to.deep.include({status: ['ERROR']});
8888
expect(result.log).to.equal('error log');

0 commit comments

Comments
 (0)