# jscodeshift-ava-to-jest

> Transforms test files from AVA to Jest

Latest version **0.2.0** (published 2016-12-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install jscodeshift-ava-to-jest
pnpm add jscodeshift-ava-to-jest
yarn add jscodeshift-ava-to-jest
bun add jscodeshift-ava-to-jest
```

Provides the command `jscodeshift-ava-to-jest`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-12-17 |
| First published | 2016-09-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Mike Nikles |
| Maintainers | mikenikles |
| Keywords | ava, jest, codemod, jscodeshift |

## Links

- npm: https://www.npmjs.com/package/jscodeshift-ava-to-jest
- Repository: https://github.com/mikenikles/jscodeshift-ava-to-jest
- Homepage: https://github.com/mikenikles/jscodeshift-ava-to-jest#readme
- Issues: https://github.com/mikenikles/jscodeshift-ava-to-jest/issues
- npm.io page: https://npm.io/package/jscodeshift-ava-to-jest

## Dependencies (5)

- [execa](https://npm.io/package/execa.md) 0.4.0
- [globby](https://npm.io/package/globby.md) 6.0.0
- [inquirer](https://npm.io/package/inquirer.md) 1.1.3
- [jscodeshift](https://npm.io/package/jscodeshift.md) 0.3.28
- [npm-run-path](https://npm.io/package/npm-run-path.md) 1.0.0

## Recent versions

- 0.2.0 (latest) — 2016-12-17
- 0.1.1 — 2016-09-14
- 0.1.0 — 2016-09-14
- 0.0.2 — 2016-09-05
- 0.0.1 — 2016-09-05

## README

# jscodeshift-ava-to-jest

A [jscodeshift](https://github.com/facebook/jscodeshift) codemod that transforms test files from [AVA](https://github.com/avajs/ava) to [Jest](https://facebook.github.io/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](https://www.npmjs.com/package/jscodeshift-ava-to-jest)

```
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](https://twitter.com/mikenikles/status/772234132436885504),
followed by [a suggestion](https://twitter.com/cpojer/status/772239240683925504) by Christoph Pojer.

## Supported AVA Assertions

- [ ] [`.pass([message])`](https://github.com/avajs/ava#passmessage)
- [ ] [`.fail([message])`](https://github.com/avajs/ava#failmessage)
- [x] [`.truthy(value, [message])`](https://github.com/avajs/ava#truthyvalue-message)
- [x] [`.falsy(value, [message])`](https://github.com/avajs/ava#falsyvalue-message)
- [x] [`.true(value, [message])`](https://github.com/avajs/ava#truevalue-message)
- [x] [`.false(value, [message])`](https://github.com/avajs/ava#falsevalue-message)
- [x] [`.is(value, expected, [message])`](https://github.com/avajs/ava#isvalue-expected-message)
- [x] [`.not(value, expected, [message])`](https://github.com/avajs/ava#notvalue-expected-message)
- [x] [`.deepEqual(value, expected, [message])`](https://github.com/avajs/ava#deepequalvalue-expected-message)
- [x] [`.notDeepEqual(value, expected, [message])`](https://github.com/avajs/ava#notdeepequalvalue-expected-message)
- [ ] [`.throws(function|promise, [error, [message]])`](https://github.com/avajs/ava#throwsfunctionpromise-error-message)
- [ ] [`.notThrows(function|promise, [message])`](https://github.com/avajs/ava#notthrowsfunctionpromise-message)
- [x] [`.regex(contents, regex, [message])`](https://github.com/avajs/ava#regexcontents-regex-message)
- [x] [`.notRegex(contents, regex, [message])`](https://github.com/avajs/ava#notregexcontents-regex-message)
- [ ] [`.ifError(error, [message])`](https://github.com/avajs/ava#iferrorerror-message)

## 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.
1. Deletes all files in `jest-tests`.
1. Copies all files from `ava-tests` to `jest-tests`.
1. Runs `jscodeshift` on all files in `jest-tests`.
1. Runs `jest` on all files in `jest-tests` to make sure the Jest tests are valid.

---
_Source: https://npm.io/package/jscodeshift-ava-to-jest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
