File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
bin/accessibility-automation Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -325,23 +325,23 @@ commandToOverwrite.forEach((command) => {
325
325
const logFilePath = path . join ( __dirname , 'accessibility-log.txt' ) ;
326
326
afterEach ( ( ) => {
327
327
328
- const logMessage = `afterEach executed for test`
329
- try {
330
- fs . appendFileSync ( logFilePath , logMessage ) ;
331
- } catch ( err ) {
332
- // ignore logging errors
333
- }
334
- if ( process . env . AFTER_EACH_RUN === 'true' || process . env . PERFORM_MODIFIED_SCAN === 'true' ) {
335
- return ;
336
- }
337
- process . env . AFTER_EACH_RUN = 'true' ;
328
+ // const logMessage = `afterEach executed for test`
329
+ // try {
330
+ // fs.appendFileSync(logFilePath, logMessage);
331
+ // } catch (err) {
332
+ // // ignore logging errors
333
+ // }
334
+ // if (process.env.AFTER_EACH_RUN === 'true' || process.env.PERFORM_MODIFIED_SCAN === 'true') {
335
+ // return;
336
+ // }
337
+ // process.env.AFTER_EACH_RUN = 'true';
338
338
339
339
try {
340
340
throw new Error ( 'Deliberate exception thrown for testing purposes' ) ;
341
341
} catch ( error ) {
342
- console . error ( ' Exception caught in afterEach:' , error ) ;
342
+ browserStackLog ( ` Exception caught in afterEach: ${ error . message } ` ) ;
343
343
if ( error && error . stack ) {
344
- console . error ( error . stack ) ;
344
+ browserStackLog ( error . stack ) ;
345
345
}
346
346
}
347
347
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ const utils = require('../../helpers/utils');
4
4
const fs = require ( 'fs' ) ;
5
5
6
6
const browserstackAccessibility = ( on , config ) => {
7
- const logFilePath = path . join ( __dirname , 'accessibility-start-log.txt' ) ;
8
- const logMessage = `afterEach executed for test`
9
- try {
10
- fs . appendFileSync ( logFilePath , logMessage ) ;
11
- } catch ( err ) {
12
- // ignore logging errors
13
- }
7
+ // const logFilePath = path.join(__dirname, 'accessibility-start-log.txt');
8
+ // const logMessage = `afterEach executed for test`
9
+ // try {
10
+ // fs.appendFileSync(logFilePath, logMessage);
11
+ // } catch (err) {
12
+ // // ignore logging errors
13
+ // }
14
14
let browser_validation = true ;
15
15
if ( process . env . BROWSERSTACK_ACCESSIBILITY_DEBUG === 'true' ) {
16
16
config . env . BROWSERSTACK_LOGS = 'true' ;
You can’t perform that action at this time.
0 commit comments