The Java script code is not getting executed for other values when it fails for first value


Amita j

There is a loop and the values are passed and based on condition it should execute the script.Please find below the code snippet

if (value !== LOCALE || value === undefined) {
throw new Error(
`value is not set for the tests! Test info`

in the above condition if there are multiple values and if the condition fails on first value it throws the error and does not check for other values.I want to execute the test for all the values and if anytime value does not match then it should show the message and continue the execution.I have tried using return also but still its not executing for other values. if (value !== LOCALE || value === undefined) { return }

Continue reading...