Skip to content

Commit 942502d

Browse files
committed
fix logs
1 parent 096a0ec commit 942502d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/commands/export.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async function exportTest(originalTest, usedNames) {
110110
fs.writeFileSync(`./${EXPORTED_TESTS_DATA_DIR}/${testName.replace('.test.js', '.json')}`, JSON.stringify(test.mongoQueries, null, 2));
111111
fs.writeFileSync(`./${EXPORTED_TESTS_DIR}/${testName}`, jestTest.replace(test.testId, testName));
112112

113-
testExported(test.testId);
113+
testExported(testName);
114114
return testName;
115115
}
116116

@@ -147,7 +147,7 @@ function saveExportJson(exportsMetadata, test, testName) {
147147
for (let test of generatedTests) {
148148
if (test.method === 'OPTIONS') continue;
149149
if (testExists(exportsMetadata, test.id)) {
150-
console.log(`Test with id ${testId} already generated, you can find it here: ${`./${EXPORTED_TESTS_DIR}/${exportsMetadata[testId].testName}`}.`);
150+
console.log(`Test with id ${test.id} already generated, you can find it here: ${`./${EXPORTED_TESTS_DIR}/${exportsMetadata[test.id].testName}`}.`);
151151
continue;
152152
}
153153

src/utils/cmdPrint.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ function logAndExit(message, type='error') {
152152
process.exit(1);
153153
}
154154

155-
function testExported(testId) {
155+
function testExported(testName) {
156156
if (!args.no_stream) console.log(`\n${green}${bold}--------------------------END OF THE TEST--------------------------${reset}`);
157157
console.log(`${green}${bold}Woohoo - you\'ve exported a test to Jest!${reset}`);
158+
console.log(`You can find test in ./pythagora_tests/exported_tests/${testName}`);
158159
// console.log(`${blue}${bold}npx pythagora --init-command \"${args.init_command.join(' ')}\" --mode jest --test-id ${testId} --no-code-coverage${reset}`)
159160
}
160161

0 commit comments

Comments
 (0)