Skip to content

fix(test): resolve TypeScript errors in axios.config.test.ts (closes #1200) - #1203

Open
rupesh-kumar-sah wants to merge 1 commit into
rinafcode:mainfrom
rupesh-kumar-sah:fix/issue-1200-axios-config-types
Open

rupesh-kumar-sah wants to merge 1 commit into
rinafcode:mainfrom
rupesh-kumar-sah:fix/issue-1200-axios-config-types

Conversation

@rupesh-kumar-sah

Copy link
Copy Markdown

Summary

Resolves #1200.

Addresses all TypeScript compilation errors reported by tsc --noEmit in tests/services/api/axios.config.test.ts:

  • Replaced Record<number, number> type annotation on delayMs with { calls: number[] } so the calls array property is properly typed.
  • Refined the setTimeout spy mockImplementation parameter and return type signatures to match NodeJS.Timeout, making the optional ms delay parameter type-safe without introducing @ts-ignore or unsafe casts.

Verification

  • npx tsc --noEmit confirms 0 errors in tests/services/api/axios.config.test.ts.
  • Behavior-preserving fix adhering strictly to project guidelines.

…inafcode#1200)

- Type delayMs as { calls: number[] } instead of Record<number, number>
- Fix setTimeout mockImplementation callback and parameter signature to match NodeJS.Timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix TypeScript errors in tests/services/api/axios.config.test.ts (type-check cleanup, part of #1074)

1 participant