Skip to content

Commit 8091c1c

Browse files
committed
fix logging of folder structure and final log when generating of single unit test suite is done
1 parent 5a6c6a2 commit 8091c1c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/helpers/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ async function makeRequest(data, options, customLogFunction) {
5858
} catch (e) {}
5959

6060
gptResponse += stringified;
61+
if (gptResponse.indexOf('pythagora_end:') > -1) return;
6162
if (customLogFunction) customLogFunction(gptResponse);
6263
else process.stdout.write(stringified);
6364
} catch (e) {}

src/helpers/unitTests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ async function createTests(filePath, funcToTest, processingFunction = 'getUnitTe
154154
try {
155155
let extension = path.extname(filePath);
156156
let ast = await getAstFromFilePath(filePath);
157-
const fileIndex = folderStructureTree.findIndex(item => item.absolutePath === filePath);
158157

159158
const foundFunctions = [];
160159

@@ -184,6 +183,7 @@ async function createTests(filePath, funcToTest, processingFunction = 'getUnitTe
184183
);
185184

186185
sortFolderTree();
186+
const fileIndex = folderStructureTree.findIndex(item => item.absolutePath === filePath);
187187

188188
for (const [i, funcData] of uniqueFoundFunctions.entries()) {
189189
let indexToPush = fileIndex + 1 + i;

0 commit comments

Comments
 (0)