jscodeshift-ava-to-jest

Transforms test files from AVA to Jest


Keywords
ava, jest, codemod, jscodeshift
License
ISC
Install
npm install jscodeshift-ava-to-jest@0.0.2

Documentation

jscodeshift-ava-to-jest

A jscodeshift codemod that transforms test files from AVA to Jest.

Install

Get jscodeshift-ava-to-jest from NPM

npm install --save-dev jscodeshift-ava-to-jest

Usage

TBD: Explain how this module can be used in an existing project.

Why?

It all started with a tweet, followed by a suggestion by Christoph Pojer.

Supported AVA Assertions

Contributing

Project structure

ava-tests: Contains tests written in AVA.

jest-tests: Contains generated Jest files.

src: Contains jscodeshift helper functions.

transform.js: The entry point for jscodeshift.

Run tests

npm test: Transforms tests from AVA to Jest. In more detail:

  1. Runs ava on all files in ava-tests to make sure the AVA tests are valid.
  2. Deletes all files in jest-tests.
  3. Copies all files from ava-tests to jest-tests.
  4. Runs jscodeshift on all files in jest-tests.
  5. Runs jest on all files in jest-tests to make sure the Jest tests are valid.