Skip to content

Commit 5a14718

Browse files
committed
fix(cli): add explicit type annotations to test mock for strict TS
1 parent 6f1eaad commit 5a14718

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cli/__tests__/codegen.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jest.mock('@constructive-io/graphql-codegen', () => {
1414

1515
return {
1616
generate: jest.fn(async () => ({ success: true, message: 'Generated SDK', filesWritten: [] as string[] })),
17-
generateMulti: jest.fn(async () => ({ results: [], hasError: false })),
18-
expandApiNamesToMultiTarget: jest.fn(() => null),
17+
generateMulti: jest.fn(async (): Promise<{ results: { name: string; result: { success: boolean } }[]; hasError: boolean }> => ({ results: [], hasError: false })),
18+
expandApiNamesToMultiTarget: jest.fn((): null => null),
1919
findConfigFile: jest.fn((): string | undefined => undefined),
2020
loadConfigFile: jest.fn(async () => ({ success: false, error: 'not found' })),
2121
splitCommas: splitCommasMock,

0 commit comments

Comments
 (0)