Skip to content

Commit bf7b8cd

Browse files
committed
bad typing on return value
1 parent 7f967df commit bf7b8cd

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/b2c-cli/test/commands/docs/search.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('docs search', () => {
4343
const listStub = sinon.stub().returns([{id: 'a', title: 'A', filePath: 'a.md'}]);
4444
command.operations = {...command.operations, listDocs: listStub};
4545

46-
const result = await runSilent(() => command.run());
46+
const result = (await runSilent(() => command.run())) as {entries: unknown[]};
4747

4848
expect(result.entries).to.have.length(1);
4949
});
@@ -69,7 +69,7 @@ describe('docs search', () => {
6969
const searchStub = sinon.stub().returns([{entry: {id: 'a', title: 'A', filePath: 'a.md'}, score: 0.1}]);
7070
command.operations = {...command.operations, searchDocs: searchStub};
7171

72-
const result = await runSilent(() => command.run());
72+
const result = (await runSilent(() => command.run())) as {results: unknown[]};
7373

7474
expect(result.results).to.have.length(1);
7575
});

packages/b2c-cli/test/commands/ecdn/security/get.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe('ecdn security get', () => {
9898
}),
9999
});
100100

101-
const result = await runSilent(() => command.run());
101+
const result = (await runSilent(() => command.run())) as {settings: {securityLevel: string; wafEnabled: boolean}};
102102

103103
expect(result.settings.securityLevel).to.equal('high');
104104
expect(result.settings.wafEnabled).to.be.true;

packages/b2c-cli/test/commands/ecdn/zones/list.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('ecdn zones list', () => {
129129
}),
130130
});
131131

132-
const result = await runSilent(() => command.run());
132+
const result = (await runSilent(() => command.run())) as {total: number; zones: Array<{name: string}>};
133133

134134
expect(result).to.have.property('total', 1);
135135
expect(result.zones).to.have.lengthOf(1);

0 commit comments

Comments
 (0)