jscodeshift-ava-to-jest

0.2.0 • Public • Published

jscodeshift-ava-to-jest

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

Deprecation Warning

I no longer maintain this package. As a great, more feature complete alternative, I recommend https://github.com/skovhus/jest-codemods.

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • latest

Version History

Package Sidebar

Install

npm i jscodeshift-ava-to-jest

Weekly Downloads

2

Version

0.2.0

License

ISC

Last publish

Collaborators

  • mikenikles