Codemods for migrating JavaScript and TypeScript test files from various frameworks to Jest.
jest-codemods is a tool that provides automated code transformations to migrate JavaScript and TypeScript test suites from multiple testing frameworks to Jest. It simplifies the adoption of Jest by handling syntax and API differences, reducing manual effort and enabling teams to try Jest on existing codebases. The tool uses codemods, which are small programs for automated code changes, to make migration as smooth as possible.
Developers and teams with existing test suites in frameworks like AVA, Chai, Jasmine, Mocha, Tape, or Sinon who want to migrate to Jest. It is particularly useful for those managing large codebases where manual migration would be time-consuming.
Developers choose jest-codemods because it supports a wide range of testing frameworks (including AVA, Chai, Jasmine, Mocha, Tape, and Sinon) and offers both an interactive CLI for ease of use and jscodeshift integration for advanced customization. Its ability to preserve code style and detect imports automatically reduces errors and manual tweaks during migration.
Codemods for migrating to Jest https://github.com/facebook/jest 👾
Supports migration from 11+ testing frameworks including AVA, Mocha, and Sinon, as listed in the README, making it versatile for diverse codebases.
Includes dry-run and force options in the CLI, allowing users to preview changes before applying them, reducing the risk of errors.
Handles both JavaScript and TypeScript test files, preserving import structures and type safety during transformation, as noted in the features.
Maintains original code quoting style and uses import/require statements to automatically determine applicable transformations, ensuring consistency.
The README explicitly warns that manual tweaks are expected post-migration, and compatibility alerts indicate not all packages are seamlessly converted.
Using jscodeshift directly requires installing multiple packages and running separate commands for each transformer, which can be cumbersome for large migrations.
Only supports specific frameworks listed; custom or niche testing setups, such as those using Karma or unsupported assertion libraries, are not covered.
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.
Debug your Jest tests. Effortlessly.🛠🖼
Jest configuration preset for Angular projects.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.