Aalexbit-codemod

testcall-timeout-to-options

Transform testCall(...) calls that contain timeout(...) into options object format

test
Public
10 executions

Run locally

npx codemod testcall-timeout-to-options

testcall-timeout-to-options

A codemod that transforms testCall(...) function calls to migrate timeout(...) arguments into an options object format.

Description

This codemod automatically refactors test calls that use timeout(...) as a separate argument, converting them to use an options object with a timeout property instead.

Transformations

Basic case

typescript

With existing options

typescript

With options variable

typescript

Timeout only

typescript

Usage

Run this codemod using the Codemod CLI:

bash

Author

Alex Bit alex@codemod.com

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.