Forum Discussion

Koboldo's avatar
Koboldo
Visitor
6 years ago

How to assert in javascript

Hi 

I'm using SoapUI 5.4.0. I tried to use assert in javascript script in form:

 assert "some_expresion_evaluated_to_boolean"

, but got an error:

"An error occurred [missing ; before statement], see error log for details"

 

I cannot find more details in log.

 

Is it possible to use assert keyword in javascript ? I didnt find such keyword on mozilla page. 

If not, what is the proper way of checking in JS ? Just "if" with throwing exception ?

 

Regards

Koboldo

No RepliesBe the first to reply