Skip to content

Commit aadbcd0

Browse files
authored
Merge branch 'main' into unit_tests
2 parents e2dd8e9 + 43f78e2 commit aadbcd0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/helpers/api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@ async function getJestTest(test) {
111111
return await makeRequest(JSON.stringify(test), options);
112112
}
113113

114-
async function getJestTestName(jestTest, usedNames) {
114+
async function getJestTestName(test, usedNames) {
115115
let options = setOptions({path:'/api/generate-jest-test-name'});
116-
return await makeRequest(JSON.stringify({test: jestTest}), options);
116+
return await makeRequest(JSON.stringify({ test }), options);
117117
}
118118

119-
async function isEligibleForExport(jestTest) {
119+
async function isEligibleForExport(test) {
120120
try {
121121
let options = setOptions({ path: '/api/check-if-eligible' });
122122

123123
const response = await axios.post(
124124
`${options.protocol}://${options.hostname}${options.port ? ':' + options.port : ''}${options.path}`,
125-
JSON.stringify({ jestTest }),
125+
JSON.stringify({ test }),
126126
{ headers: options.headers }
127127
);
128128

src/scripts/enterData.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const {loginRouteEnteredLog} = require("../utils/cmdPrint");
22
const {updateMetadata} = require("../utils/common");
3+
const {setUpPythagoraDirs} = require("../helpers/starting");
34
const {METADATA_FILENAME, SRC_TO_ROOT} = require("../const/common");
45
// TODO make require path better!!
5-
let pythagoraMetadata = require(`../${SRC_TO_ROOT}.pythagora/${METADATA_FILENAME}`);
66
const readline = require("readline");
77
const _ = require("lodash");
88

99

1010
function askForLoginRoute(rl) {
11-
rl.question('Please enter the endpoint path of the login route (eg. /api/auth/login): ', loginPath => {
11+
rl.question('\x1b[32m Please enter the endpoint path of the login route (eg. /api/auth/login): \x1b[0m', loginPath => {
1212
loginRouteEnteredLog(loginPath);
1313

1414
rl.question('Is this correct login endpoint path (Y/N): ', answer => {
@@ -35,4 +35,6 @@ function addExportData() {
3535
}, 500);
3636
}
3737

38+
setUpPythagoraDirs();
39+
let pythagoraMetadata = require(`../${SRC_TO_ROOT}.pythagora/${METADATA_FILENAME}`);
3840
addExportData();

0 commit comments

Comments
 (0)