facebook / facebook/jscodeshift

Remove test file `.js` requirement in testUtils

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

Description

Currently the `runTest` function in [testUtils.js](https://github.com/facebook/jscodeshift/blob/master/src/testUtils.js#L59) hardcodes `.input.js` and `.output.js` to the test filenames it looks for, which doesn't allow for running test files with `.mjs` extensions ([ES modules](https://tc39.es/ecma262/#sec-modules)).

Can we get a way to run `.mjs` test files?

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.