Skip to content

Commit ccb477e

Browse files
authored
Merge pull request #792 from browserstack/SDK-460
Fix Test Observability disable flags
2 parents 3e5da4b + 15ac868 commit ccb477e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/testObservability/helper/helper.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ exports.resolveModule = (module) => {
815815
};
816816

817817
const getReRunSpecs = (rawArgs) => {
818+
let finalArgs = rawArgs;
818819
if (this.isTestObservabilitySession() && this.shouldReRunObservabilityTests()) {
819820
let startIdx = -1, numEle = 0;
820821
for(let idx=0; idx<rawArgs.length; idx++) {
@@ -827,10 +828,9 @@ const getReRunSpecs = (rawArgs) => {
827828
}
828829
}
829830
if(startIdx != -1) rawArgs.splice(startIdx, numEle + 1);
830-
return [...rawArgs, '--spec', process.env.BROWSERSTACK_RERUN_TESTS];
831-
} else {
832-
return rawArgs;
831+
finalArgs = [...rawArgs, '--spec', process.env.BROWSERSTACK_RERUN_TESTS];
833832
}
833+
return finalArgs.filter(item => item !== '--disable-test-observability' && item !== '--disable-browserstack-automation');
834834
}
835835

836836
const getLocalSessionReporter = () => {

0 commit comments

Comments
 (0)