From 6e94aefe6cbdddd6ddf53b1502893d981237ebf4 Mon Sep 17 00:00:00 2001 From: Sergii Gorbachov Date: Tue, 20 Aug 2024 13:48:15 -0700 Subject: [PATCH 1/3] added docs --- src/convert-test-files.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/convert-test-files.ts b/src/convert-test-files.ts index e1dd4db..f199eef 100644 --- a/src/convert-test-files.ts +++ b/src/convert-test-files.ts @@ -12,6 +12,14 @@ import { // Define the function type for LLM call export type LLMCallFunction = (prompt: string) => Promise; +/** + * Converts test files and processes them using the specified parameters. + * + * This function takes an array of test file paths and performs a series of operations + * including setting up the Jest environment, setting up configurations, and output paths. + * It also utilizes an LLM (Large Language Model) call function to process the test files. + * The results of the conversion are stored in the specified output directory. + */ export const convertTestFiles = async ({ filePaths, logLevel, From db0a7db556f712d29a79f4eb710b60945277a660 Mon Sep 17 00:00:00 2001 From: Sergii Gorbachov Date: Tue, 20 Aug 2024 13:51:00 -0700 Subject: [PATCH 2/3] linted --- src/convert-test-files.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/convert-test-files.ts b/src/convert-test-files.ts index f199eef..0f6004b 100644 --- a/src/convert-test-files.ts +++ b/src/convert-test-files.ts @@ -15,9 +15,9 @@ export type LLMCallFunction = (prompt: string) => Promise; /** * Converts test files and processes them using the specified parameters. * - * This function takes an array of test file paths and performs a series of operations - * including setting up the Jest environment, setting up configurations, and output paths. - * It also utilizes an LLM (Large Language Model) call function to process the test files. + * This function takes an array of test file paths and performs a series of operations + * including setting up the Jest environment, setting up configurations, and output paths. + * It also utilizes an LLM (Large Language Model) call function to process the test files. * The results of the conversion are stored in the specified output directory. */ export const convertTestFiles = async ({ From 9ce13934fe17a4c198857eea79f88626e2140fb0 Mon Sep 17 00:00:00 2001 From: Sergii Gorbachov Date: Tue, 20 Aug 2024 13:53:24 -0700 Subject: [PATCH 3/3] fixed todo --- .../individual-transformations/convert-mount-shallow-methods.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/ast-transformations/individual-transformations/convert-mount-shallow-methods.ts b/src/support/ast-transformations/individual-transformations/convert-mount-shallow-methods.ts index e28d6f1..86cbd4c 100644 --- a/src/support/ast-transformations/individual-transformations/convert-mount-shallow-methods.ts +++ b/src/support/ast-transformations/individual-transformations/convert-mount-shallow-methods.ts @@ -6,7 +6,7 @@ return shallow(); } * Assumption: only one method is used: mount or shallow, but not both. - * TODO: fix this by collecting all the matched queries and return an array. See removeMountAndShallow.jest.tsx with all tests active + * Feature: fix this by collecting all the matched queries for shallowCall and mountCall. Now it handles cases with either mount shallow, but not both */ import { JSCodeshift, Collection, CallExpression } from 'jscodeshift';