Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

mikenikles/jscodeshift-ava-to-jest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Transforms test files from AVA to Jest

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published