Codemods for AVA that simplifies upgrading to newer versions
Codemods are small programs that help you automate changes to your codebase. Think of them as search and replace on steroids.
This module contains a set of codemods that enable you to upgrade your code between various AVA releases. It is maintained by the AVA team, and will be updated anytime we introduce breaking API changes. We plan to eventually introduce codemods that allow you to switch from other popular test runners like mocha
and tap
.
$ npm install --global ava-codemods
$ ava-codemods --help
Usage
$ ava-codemods [<file|glob> ...]
Options
--force, -f Bypass safety checks and forcibly run codemods
Available upgrades
- 0.16.x → 0.17.x
- 0.13.x → 0.14.x
Simply run ava-codemods
in your terminal and answer a few questions. You can pass a filename directly to the CLI. If you do not, you will be prompted for one.
Ensure you have a backup of your tests or commit the latest changes before running this.
- Renaming
t.error()
tot.ifError()
- Renaming
t.ok()
tot.truthy()
- Renaming
t.notOk()
tot.falsy()
- Renaming
t.same()
tot.deepEqual()
- Renaming
t.notSame()
tot.notDeepEqual()
MIT © James Talmage