🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

jest-codemods

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-codemods

Codemods to switch test framework to Jest

0.0.1
Source
npm
Version published
Weekly downloads
3.2K
-37.7%
Maintainers
1
Weekly downloads
 
Created
Source

jest-codemods

Codemods for Jest that simplify migrating to Jest. Currently only from Tape.

Build Status version ![MIT License][license-badge] Tweet

Codemods are small programs that help you automate changes to your codebase. Think of them as search and replace on steroids. They are executed by the Facebook jscodeshift tool.

Install

$ npm install --global jest-codemods

This installs a binary tape-to-jest.

Tape to Jest codemod

Currently we support migrating from Tape to Jest.

$ tape-to-jest --help

	Usage
	  $ tape-to-jest <path> [options]

	path	Files or directory to transform. Can be a glob like src/**.test.js

	Options
	  --force, -f	Bypass Git safety checks and forcibly run codemods
	  --dry, -d		Dry run (no changes are made to files)
	  --parser		The parser to use for parsing your source files (babel | babylon | flow)  [babel]

To transform all test files in a directory run tape-to-jest mySrcFolder in your terminal. Only files requiring or importing tape will be transformed. Notice the console output for errors, manual intervention might be required.

Inspiration

Thanks to ava-codemods for inspiration.

License

MIT

Keywords

codemod

FAQs

Package last updated on 17 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts