← All recipes
Moderne licensed

Replace source-map-support/register with enable-source-maps in mocha config

Recipe IDorg.openrewrite.node.migrate.source-map-support.replace-source-map-support-register-in-mocha-configArtifact@openrewrite/recipes-nodejs

Replaces source-map-support/register in the require list of .mocharc.js/.mocharc.cjs with 'enable-source-maps': true, which mocha forwards to Node as --enable-source-maps, and --require source-map-support/register in mocha.opts with --enable-source-maps.

Single recipesource-map-supportProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.node.migrate.source-map-support.replace-source-map-support-register-in-mocha-config

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs