feat(jscodeshift): update to v0.7 (#43107)

- defineTest with testOptions

https://github.com/facebook/jscodeshift/releases/tag/v0.7.0

https://github.com/facebook/jscodeshift/compare/v0.7.0..v0.6.4

Co-authored-by: Trung Nguyen <trungn@axon.com>
This commit is contained in:
Will Nguyen 2020-03-20 22:45:38 +07:00 committed by GitHub
parent a130517e8f
commit 4b580a2061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,8 @@
// Type definitions for jscodeshift 0.6
// Type definitions for jscodeshift 0.7
// Project: https://github.com/facebook/jscodeshift#readme
// Definitions by: Brie Bunge <https://github.com/brieb>
// Brian Jacobel <https://github.com/bjacobel>
// Will Nguyen <https://github.com/willtn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9

View File

@ -1,10 +1,16 @@
import { Transform, Options } from './core';
import recast = require("recast");
export interface TestOptions {
parser?: recast.Parser | string;
}
export function defineTest(
dirName: string,
transformName: string,
options: Options,
testFilePrefix?: string
testFilePrefix?: string,
testOptions?: TestOptions
): () => any;
export function defineInlineTest(

View File

@ -87,6 +87,8 @@ testUtils.defineTest(
"directory",
"transformName",
{ opt: true },
undefined,
{ parser: 'tsx' }
);
// Can define a test