Skip to content

Commit 726a5b0

Browse files
committed
added logs
1 parent 80d4e1b commit 726a5b0

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

bin/helpers/utils.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,17 +1522,17 @@ exports.setOtherConfigs = (bsConfig, args) => {
15221522
exports.readBsConfigJSON = (bsConfigPath) => {
15231523
try {
15241524
fs.accessSync(bsConfigPath, fs.constants.R_OK);
1525-
return fs.readFileSync(bsConfigPath, 'utf-8');
1526-
// console.log(`configContent: ${configContent}`);
1527-
// try {
1528-
// const bsConfig = JSON.parse(configContent);
1529-
// const normalizedBsConfig = exports.normalizeTestReportingConfig(bsConfig);
1530-
// console.log(`normalizedBsConfig: ${JSON.stringify(normalizedBsConfig)}`);
1531-
// return JSON.stringify(normalizedBsConfig);
1532-
// } catch (err) {
1533-
// logger.error(`Error parsing JSON from ${bsConfigPath}:`, err);
1534-
// return configContent;
1535-
// }
1525+
const configContent = fs.readFileSync(bsConfigPath, 'utf-8');
1526+
console.log(`configContent: ${configContent}`);
1527+
try {
1528+
const bsConfig = JSON.parse(configContent);
1529+
const normalizedBsConfig = exports.normalizeTestReportingConfig(bsConfig);
1530+
console.log(`normalizedBsConfig: ${JSON.stringify(normalizedBsConfig)}`);
1531+
return JSON.stringify(normalizedBsConfig);
1532+
} catch (err) {
1533+
logger.error(`Error parsing JSON from ${bsConfigPath}:`, err);
1534+
return null;
1535+
}
15361536
} catch (err) {
15371537
return null;
15381538
}

bin/testObservability/helper/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ const setCrashReportingConfig = (bsConfig, bsConfigPath) => {
353353
console.log(`Setting Crash Reporting Config with bsConfigPath: ${bsConfigPath}`);
354354
const browserstackConfigFile = utils.readBsConfigJSON(bsConfigPath);
355355
console.log(`checking the type of bsConfig: ${typeof bsConfig}`);
356+
console.log(`printing username and acces_key from bsConfig: ${bsConfig["auth"]["username"]} : ${bsConfig["auth"]["access_key"]}`);
356357

357358
const cypressConfigFile = getCypressConfigFileContent(bsConfig, null);
358359
const credentialsStr = JSON.stringify({

0 commit comments

Comments
 (0)