facebook / facebook/jscodeshift

Resolve the new file contents from the runner

Open
#59 2 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
JavaScript
Stars
10k
Forks
498
PR merge metrics
No merged PRs in 30d

Description

I'm writing tests for my codemod and want to use the runner programmatically instead of shelling out. I have two fixture files, a before and an after. I want to dry-run the before file, get the output and compare it to my after file.

However, when running the runner programmatically with dry run, I don't believe there is any way to receive the new file. The runner should probably resolve an object that contains information about how long it took to run and the new content.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.