Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions bin/testObservability/cypress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

/* Used to detect Gherkin steps */

const util = require('util');

let eventsQueue = [];
let testRunStarted = false;

Expand Down
6 changes: 5 additions & 1 deletion bin/testObservability/helper/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ const getCypressCommandEventListener = (isJS) => {
)
}

const isE2ESupportFile = (file) => {
return file.includes('e2e.js') || file.includes('e2e.ts');
}

exports.setEventListeners = (bsConfig) => {
try {
const supportFilesData = helper.getSupportFiles(bsConfig, false);
Expand All @@ -292,7 +296,7 @@ exports.setEventListeners = (bsConfig) => {
if(err) return exports.debug('EXCEPTION IN BUILD START EVENT : Unable to parse cypress support files');
files.forEach(file => {
try {
if(!file.includes('commands.js')) {
if (isE2ESupportFile(file) || !files.some(f => isE2ESupportFile(f))) {
const defaultFileContent = fs.readFileSync(file, {encoding: 'utf-8'});

let cypressCommandEventListener = getCypressCommandEventListener(file.includes('js'));
Expand Down
Loading